mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-22 13:43:22 +00:00
f0478220d8
Skalibs is a set of general-purpose C programming libraries used for building all software at skarnet.org.
29 lines
595 B
Diff
29 lines
595 B
Diff
--- a/src/libstddjb/getpeereid.h
|
|
+++ b/src/libstddjb/getpeereid.h
|
|
@@ -3,6 +3,14 @@
|
|
#ifndef GETPEEREID_H
|
|
#define GETPEEREID_H
|
|
|
|
+#include "sysdeps.h"
|
|
+
|
|
+#ifdef HASGETPEEREID
|
|
+/* syscall exists - do nothing */
|
|
+
|
|
+#else
|
|
+
|
|
extern int getpeereid (int, int *, int *) ;
|
|
|
|
#endif
|
|
+#endif
|
|
--- a/src/libstddjb/ipc_eid.c
|
|
+++ b/src/libstddjb/ipc_eid.c
|
|
@@ -5,7 +5,7 @@
|
|
|
|
int ipc_eid (int s, unsigned int *u, unsigned int *g)
|
|
{
|
|
- int dummyu, dummyg ;
|
|
+ unsigned int dummyu, dummyg ;
|
|
if (getpeereid(s, &dummyu, &dummyg) < 0) return -1 ;
|
|
*u = (unsigned int)dummyu ;
|
|
*g = (unsigned int)dummyg ;
|