[libvirt] [PATCH 11/14] Add stub getegid impl for platforms lacking it

Daniel P. Berrange berrange at redhat.com
Mon Oct 21 13:12:46 UTC 2013


From: "Daniel P. Berrange" <berrange at redhat.com>

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 at redhat.com>
---
 src/util/virutil.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/util/virutil.h b/src/util/virutil.h
index e8765b2..2229c73 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.3.1




More information about the libvir-list mailing list