]> xenbits.xensource.com Git - libvirt.git/commitdiff
Add stub getegid impl for platforms lacking it
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 17 Oct 2013 13:51:32 +0000 (14:51 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 21 Oct 2013 13:03:52 +0000 (14:03 +0100)
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 <berrange@redhat.com>
src/util/virutil.h

index e8765b24a754f98b4e6b40abd7086a0abf00f1c6..2229c7332a0e5103323597160f9b1b4df082edfb 100644 (file)
@@ -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);