From 9e0c7ac4879bd69d5dba7c81b40142feeb33d666 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Mon, 27 Apr 2015 08:30:53 -0400 Subject: configure.ac: Check for rpcsvc/mount.h The function check_callit() attempts to reference a number of defines from files that might not be available for everything but glibc. For simplicity assume that if there is no rpcsvc/mount.h all the other includes do not exist either. Signed-off-by: Bernhard Reutner-Fischer Signed-off-by: Steve Dickson --- configure.ac | 2 +- src/security.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 27496c7..39cd129 100644 --- a/configure.ac +++ b/configure.ac @@ -55,6 +55,6 @@ AS_IF([test x$enable_libwrap = xyes], [ AC_SEARCH_LIBS([pthread_create], [pthread]) -AC_CHECK_HEADERS(nss.h) +AC_CHECK_HEADERS([nss.h rpcsvc/mount.h]) AC_OUTPUT([Makefile]) diff --git a/src/security.c b/src/security.c index 70edef4..0c9453f 100644 --- a/src/security.c +++ b/src/security.c @@ -20,12 +20,29 @@ /* * XXX for special case checks in check_callit. */ +#ifdef HAVE_RPCSVC_MOUNT_H #include #include #include #include #include #include +#else +# define MOUNTPROC_MNT 1 +# define MOUNTPROC_UMNT 3 +# define NFS_PROGRAM 100003 +# define YPPROG 100004 +# define MOUNTPROG 100005 +# define YPBINDPROG 100007 +# define YPPASSWDPROG 100009 +# define RQUOTAPROG 100011 + +# define YPBINDPROC_SETDOM 2 +# define YPPROC_MATCH 3 +# define YPPROC_FIRST 4 +# define YPPROC_NEXT 5 +# define YPPROC_ALL 8 +#endif #include "rpcbind.h" -- cgit v1.2.1