summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/getresgid.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-02-09 03:24:42 +0000
committerMike Frysinger <vapier@gentoo.org>2006-02-09 03:24:42 +0000
commit831219203b354146565ccc421a12f7237e0e3faa (patch)
treed9d56a769bb261ca5f227e859d6e73cbb2457b95 /libc/sysdeps/linux/common/getresgid.c
parent7477fa1a17a5604040a51d980d21e27c6e281b6e (diff)
use the newer versions of functions when available (fixes sparc which doesnt provide older versions at all)
Diffstat (limited to 'libc/sysdeps/linux/common/getresgid.c')
-rw-r--r--libc/sysdeps/linux/common/getresgid.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/libc/sysdeps/linux/common/getresgid.c b/libc/sysdeps/linux/common/getresgid.c
index b7f1cbc6c..158a8984f 100644
--- a/libc/sysdeps/linux/common/getresgid.c
+++ b/libc/sysdeps/linux/common/getresgid.c
@@ -10,10 +10,15 @@
#include "syscalls.h"
#include <unistd.h>
-#ifdef __NR_getresgid
+#if defined(__NR_getresgid32)
+# undef __NR_getresgid
+# define __NR_getresgid __NR_getresgid32
+_syscall3(int, getresgid, gid_t *, rgid, gid_t *, egid, gid_t *, sgid)
+
+#elif defined(__NR_getresgid)
# define __NR___syscall_getresgid __NR_getresgid
-static inline _syscall3(int, __syscall_getresgid, __kernel_gid_t *, egid,
- __kernel_gid_t *, rgid, __kernel_gid_t *, sgid);
+static inline _syscall3(int, __syscall_getresgid, __kernel_gid_t *, rgid,
+ __kernel_gid_t *, egid, __kernel_gid_t *, sgid);
int getresgid(gid_t * rgid, gid_t * egid, gid_t * sgid)
{