r25866: nss_wrapper: not all systems have get*_r calls
authorStefan Metzmacher <metze@samba.org>
Tue, 6 Nov 2007 07:06:50 +0000 (08:06 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 21 Dec 2007 04:44:32 +0000 (05:44 +0100)
metze
(This used to be commit 6a3f97aeac81cf7dd1a28fd9f17ec2f6e35300dc)

source4/lib/nss_wrapper/nss_wrapper.c

index dae3c1c626c781069075f899d45900405bf2e3cc..1b75aa59e648aef357b7485b897c3081440001a4 100644 (file)
 #define _PUBLIC_
 #endif
 
+/* not all systems have _r functions... */
+#ifndef HAVE_GETPWNAM_R
+#define getpwnam_r(name, pwdst, buf, buflen, pwdstp)   ENOSYS
+#endif
+#ifndef HAVE_GETPWUID_R
+#define getpwuid_r(uid, pwdst, buf, buflen, pwdstp)    ENOSYS
+#endif
+#ifndef HAVE_GETPWENT_R
+#define getpwent_r(pwdst, buf, buflen, pwdstp)         ENOSYS
+#endif
+#ifndef HAVE_GETGRNAM_R
+#define getgrnam_r(name, grdst, buf, buflen, grdstp)   ENOSYS
+#endif
+#ifndef HAVE_GETGRUID_R
+#define getgrgid_r(uid, grdst, buf, buflen, grdstp)    ENOSYS
+#endif
+#ifndef HAVE_GETGRENT_R
+#define getgrent_r(grdst, buf, buflen, grdstp)         ENOSYS
+#endif
+
 /* LD_PRELOAD doesn't work yet, so REWRITE_CALLS is all we support
  * for now */
 #define REWRITE_CALLS