uwrap: Fix build if getres(uid|gid) are not available.
authorAndreas Schneider <asn@samba.org>
Fri, 23 Jan 2015 15:01:49 +0000 (16:01 +0100)
committerAndreas Schneider <asn@samba.org>
Fri, 31 Jul 2015 13:17:59 +0000 (15:17 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
src/uid_wrapper.c

index 1d49a852cda693add946230d8114c2181436e2d8..a5e4fe57525c882022c6d65fe12a099242d03d52 100644 (file)
@@ -1537,7 +1537,7 @@ static long int uwrap_syscall (long int sysno, va_list vp)
                        }
                        break;
 #endif /* SYS_setresgid */
-#ifdef SYS_getresgid
+#if defined(SYS_getresgid) && defined(HAVE_GETRESGID)
                case SYS_getresgid:
 #ifdef HAVE_LINUX_32BIT_SYSCALLS
                case SYS_getresgid32:
@@ -1550,7 +1550,7 @@ static long int uwrap_syscall (long int sysno, va_list vp)
                                rc = uwrap_getresgid(rgid, egid, sgid);
                        }
                        break;
-#endif /* SYS_getresgid */
+#endif /* SYS_getresgid && HAVE_GETRESGID */
 
                /* uid */
                case SYS_getuid:
@@ -1606,7 +1606,7 @@ static long int uwrap_syscall (long int sysno, va_list vp)
                        }
                        break;
 #endif /* SYS_setresuid */
-#ifdef SYS_getresuid
+#if defined(SYS_getresuid) && defined(HAVE_GETRESUID)
                case SYS_getresuid:
 #ifdef HAVE_LINUX_32BIT_SYSCALLS
                case SYS_getresuid32:
@@ -1619,7 +1619,7 @@ static long int uwrap_syscall (long int sysno, va_list vp)
                                rc = uwrap_getresuid(ruid, euid, suid);
                        }
                        break;
-#endif /* SYS_getresuid */
+#endif /* SYS_getresuid && HAVE_GETRESUID*/
                /* groups */
                case SYS_setgroups:
 #ifdef HAVE_LINUX_32BIT_SYSCALLS