uwrap: Fix build if getres(uid|gid) are not available.
authorAndreas Schneider <asn@samba.org>
Fri, 21 Aug 2015 09:04:49 +0000 (11:04 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 21 Aug 2015 12:46:15 +0000 (14:46 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
lib/uid_wrapper/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