]> xenbits.xensource.com Git - libvirt.git/commitdiff
Add compat function for geteuid()
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 11 Mar 2011 15:49:39 +0000 (15:49 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 15 Mar 2011 15:26:35 +0000 (15:26 +0000)
* configure.ac: Check for geteuid()
* src/util/util.h: Compat for geteuid()

configure.ac
src/util/util.h

index a58ee4e3e6395f25e06a81f10f53050440b12138..e2b2b2447f0e083bd7165ff26f69429cb3098d8c 100644 (file)
@@ -120,7 +120,7 @@ AC_MSG_RESULT([$have_cpuid])
 dnl Availability of various common functions (non-fatal if missing),
 dnl and various less common threadsafe functions
 AC_CHECK_FUNCS_ONCE([cfmakeraw regexec sched_getaffinity getuid getgid \
- initgroups posix_fallocate mmap kill \
geteuid initgroups posix_fallocate mmap kill \
  getmntent_r getgrnam_r getpwuid_r])
 
 dnl Availability of pthread functions (if missing, win32 threading is
index 31c3a336199fecee982ebf26b432472d0f6e500b..c313023e3bbd54071ec72d3613f5f5649d1a9aca 100644 (file)
@@ -269,6 +269,10 @@ const char *virEnumToString(const char *const*types,
 static inline int getuid (void) { return 0; }
 # endif
 
+# ifndef HAVE_GETEUID
+static inline int geteuid (void) { return 0; }
+# endif
+
 # ifndef HAVE_GETGID
 static inline int getgid (void) { return 0; }
 # endif