libreplace: Add getpeereid implementation.
[kai/samba-autobuild/.git] / lib / replace / replace.h
index 3f289d7f47bcd3a1519182fc1e48dec66a82618a..f2b1952376c0c6a323935c353ce69594f7594f90 100644 (file)
 #include <bsd/string.h>
 #endif
 
+#ifdef HAVE_BSD_UNISTD_H
+#include <bsd/unistd.h>
+#endif
+
 #ifdef HAVE_STRING_H
 #include <string.h>
 #endif
@@ -826,4 +830,9 @@ char *rep_getpass(const char *prompt);
 #endif
 #endif
 
+#ifndef HAVE_GETPEEREID
+#define getpeereid rep_getpeereid
+int rep_getpeereid(int s, uid_t *uid, gid_t *gid);
+#endif
+
 #endif /* _LIBREPLACE_REPLACE_H */