render / rpms / libvirt

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