summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compat/nss_compat.h5
-rw-r--r--configure.ac11
2 files changed, 15 insertions, 1 deletions
diff --git a/compat/nss_compat.h b/compat/nss_compat.h
index b438b8f..238f77c 100644
--- a/compat/nss_compat.h
+++ b/compat/nss_compat.h
@@ -22,7 +22,12 @@
#ifndef COMPAT__NSS_H
#define COMPAT__NSS_H
+#ifdef HAVE_NSS_H
#include <nss.h>
+#endif /* HAVE_NSS_H */
+#ifdef HAVE_NSS_COMMON_H
+#include <nss_common.h>
+#endif /* HAVE_NSS_COMMON_H */
#ifdef HAVE_ALIASES_H
#include <aliases.h>
#endif
diff --git a/configure.ac b/configure.ac
index 9284a75..fb9a2d6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -209,7 +209,7 @@ AC_SUBST(NSS_LDAP_SONAME)
# checks for availability of header files
AC_CHECK_HEADERS([ctype.h strings.h pthread.h fcntl.h limits.h])
-AC_CHECK_HEADERS([nss.h grp.h shadow.h aliases.h netdb.h rpc/rpcent.h])
+AC_CHECK_HEADERS([nss.h nss_common.h grp.h shadow.h aliases.h netdb.h rpc/rpcent.h])
AC_CHECK_HEADERS([netinet/ether.h arpa/inet.h netinet/in.h])
AC_CHECK_HEADERS([sys/socket.h sys/un.h sys/ucred.h ucred.h sys/param.h sys/time.h])
AC_CHECK_HEADERS([getopt.h syslog.h])
@@ -310,6 +310,15 @@ then
#include <rpc/rpcent.h>
#endif])
+ # check for a definition of struct rpcent
+ AC_CHECK_TYPES(enum nss_status,,,[
+ #ifdef HAVE_NSS_H
+ #include <nss.h>
+ #endif
+ #ifdef HAVE_NSS_COMMON_H
+ #include <nss_common.h>
+ #endif])
+
# restore CFLAGS and LIBS
CFLAGS="$nss_save_CFLAGS"
LIBS="$nss_save_LIBS"