<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - caps.c fails to compile on Windows"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=66846">66846</a>
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>lennart@poettering.net
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>pulseaudio-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>caps.c fails to compile on Windows
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>pulseaudio-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>pierre-bugzilla@ossman.eu
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>daemon
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>PulseAudio
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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) {</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>