From 89c532d843c95a085777c66365067d64d1937eb9 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Sat, 18 Jan 2014 20:43:49 +1100 Subject: - (dtucker) [uidswap.c] Prevent unused variable warnings on Cygwin. Patch from vinschen at redhat.com --- uidswap.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'uidswap.c') diff --git a/uidswap.c b/uidswap.c index 23217ba5c..1f09d5887 100644 --- a/uidswap.c +++ b/uidswap.c @@ -134,7 +134,9 @@ temporarily_use_uid(struct passwd *pw) void permanently_drop_suid(uid_t uid) { +#ifndef HAVE_CYGWIN uid_t old_uid = getuid(); +#endif debug("permanently_drop_suid: %u", (u_int)uid); if (setresuid(uid, uid, uid) < 0) @@ -197,8 +199,10 @@ restore_uid(void) void permanently_set_uid(struct passwd *pw) { +#ifndef HAVE_CYGWIN uid_t old_uid = getuid(); gid_t old_gid = getgid(); +#endif if (pw == NULL) fatal("permanently_set_uid: no user given"); -- cgit v1.2.3