about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/sparc
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/sparc')
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/setegid.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/setegid.c b/sysdeps/unix/sysv/linux/sparc/sparc32/setegid.c
index 11643f6d39..96f807484d 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/setegid.c
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/setegid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -38,11 +38,13 @@ setegid (gid_t gid)
 
   /* First try the syscall.  */
   result = __setresgid (-1, gid, -1);
+# if __ASSUME_SETRESGID_SYSCALL == 0
   if (result == -1 && errno == ENOSYS)
     /* No system call available.  Use emulation.  This may not work
        since `setregid' also sets the saved group ID when GID is not
        equal to the real group ID, making it impossible to switch back. */
     result = __setregid (-1, gid);
+# endif
 
   return result;
 }