From 0a0b9b0e2553d2bc26e88dc07859029124562ce2 Mon Sep 17 00:00:00 2001 Message-Id: <0a0b9b0e2553d2bc26e88dc07859029124562ce2.1383321465.git.jdenemar@redhat.com> From: "Daniel P. Berrange" Date: Wed, 30 Oct 2013 17:01:55 +0000 Subject: [PATCH] Add stub getegid impl for platforms lacking it For https://bugzilla.redhat.com/show_bug.cgi?id=1015247 We already have stubs for getuid, geteuid, getgid but not for getegid. Something in gnulib already does a check for it during configure, so we already have the HAVE_GETEGID macro defined. Signed-off-by: Daniel P. Berrange (cherry picked from commit c566fa1ad007a280bdf5132f7f91010459036ff6) Signed-off-by: Jiri Denemark --- src/util/virutil.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/util/virutil.h b/src/util/virutil.h index 8739e4e..2c8b0ec 100644 --- a/src/util/virutil.h +++ b/src/util/virutil.h @@ -108,6 +108,10 @@ static inline int geteuid (void) { return 0; } static inline int getgid (void) { return 0; } # endif +# ifndef HAVE_GETEGID +static inline int getegid (void) { return 0; } +# endif + char *virGetHostname(void); char *virGetUserDirectory(void); -- 1.8.4.2