summaryrefslogtreecommitdiff
path: root/src/sysdeps/trygetpeereid.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sysdeps/trygetpeereid.c')
-rw-r--r--src/sysdeps/trygetpeereid.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/sysdeps/trygetpeereid.c b/src/sysdeps/trygetpeereid.c
new file mode 100644
index 0000000..10a411a
--- /dev/null
+++ b/src/sysdeps/trygetpeereid.c
@@ -0,0 +1,15 @@
+/* ISC license. */
+
+#undef _POSIX_C_SOURCE
+#undef _XOPEN_SOURCE
+
+#include <sys/types.h>
+#include <unistd.h>
+
+int main (void)
+{
+ uid_t uid ;
+ gid_t gid ;
+ int s = 0 ;
+ return getpeereid(s, &uid, &gid) ;
+}