nss_wrapper: try to fix the build of nss_wrapper on solaris.
authorGünther Deschner <gd@samba.org>
Sat, 30 May 2009 20:43:17 +0000 (22:43 +0200)
committerGünther Deschner <gd@samba.org>
Sat, 30 May 2009 21:08:12 +0000 (23:08 +0200)
Guenther

lib/nss_wrapper/nss_wrapper.c
lib/replace/system/config.m4

index b62be61d1228704f90a3c8dc48f9e698bb6fc45e..d7f7b0ba569ab3a90cffa79d18edca9cff0220fd 100644 (file)
 #define getgrent_r(grdst, buf, buflen, grdstp)         ENOSYS
 #endif
 
+/* not all systems have getgrouplist */
+#ifndef HAVE_GETGROUPLIST
+#define getgrouplist(user, group, groups, ngroups)     0
+#endif
+
 /* LD_PRELOAD doesn't work yet, so REWRITE_CALLS is all we support
  * for now */
 #define REWRITE_CALLS
index 5c9b53d5c59086ae22229e1e1d098aa330fef877..e2196586ad63a83d7fd9e4d8605f8a200b81ff35 100644 (file)
@@ -116,6 +116,7 @@ AC_VERIFY_C_PROTOTYPE([struct group *getgrent_r(struct group *src, char *buf, si
        #include <unistd.h>
        #include <grp.h>
        ])
+AC_CHECK_FUNCS(getgrouplist)
 
 # locale
 AC_CHECK_HEADERS(ctype.h locale.h)