Bug 66846

Summary: caps.c fails to compile on Windows
Product: PulseAudio Reporter: Pierre Ossman <pierre-bugzilla>
Component: daemonAssignee: pulseaudio-bugs
Status: RESOLVED FIXED QA Contact: pulseaudio-bugs
Severity: normal    
Priority: medium CC: lennart
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Pierre Ossman 2013-07-12 07:56:50 UTC
daemon/caps.c: In function 'pa_drop_root':
daemon/caps.c:77:9: error: 'uid' undeclared (first use in this function)
daemon/caps.c:77:9: note: each undeclared identifier is reported only once for each function it appears in
make[7]: *** [pulseaudio-caps.o] Error 1

You can't be looking at uid if the system doesn't have getuid(). :)

Fix:

Index: src/daemon/caps.c
===================================================================
--- src/daemon/caps.c	(revision 27650)
+++ src/daemon/caps.c	(working copy)
@@ -72,10 +72,10 @@
     pa_assert_se(geteuid() == uid);
     pa_assert_se(getgid() == gid);
     pa_assert_se(getegid() == gid);
-#endif
 
     if (uid != 0)
         pa_drop_caps();
+#endif
 }
 
 void pa_drop_caps(void) {

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.