]> code.delx.au - pulseaudio/commitdiff
caps: Fix platform checking
authorTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Mon, 30 Dec 2013 12:31:33 +0000 (14:31 +0200)
committerTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Mon, 30 Dec 2013 12:31:33 +0000 (14:31 +0200)
The "#elif __FreeBSD__" line caused a warning, because __FreeBSD__ was
not defined.

src/daemon/caps.c

index 7fc7357edc9b6b6630fd8684a1f4d4bd5d0a1548..4455db3a93b7b24eb0768aea0a9ac7c9bbe18a95 100644 (file)
@@ -80,16 +80,16 @@ void pa_drop_root(void) {
 
 void pa_drop_caps(void) {
 #ifdef HAVE_SYS_CAPABILITY_H
-#ifdef __linux
+#if defined(__linux)
     cap_t caps;
     pa_assert_se(caps = cap_init());
     pa_assert_se(cap_clear(caps) == 0);
     pa_assert_se(cap_set_proc(caps) == 0);
     pa_assert_se(cap_free(caps) == 0);
-#elif __FreeBSD__
+#elif defined(__FreeBSD__)
     pa_assert_se (cap_enter () == 0);
 #else
-#error Don't know how to do capabilities on your system.  Please send a patch.
+#error "Don't know how to do capabilities on your system.  Please send a patch."
 #endif /* __linux */
 #else /* HAVE_SYS_CAPABILITY_H */
     pa_log_warn("Normally all extra capabilities would be dropped now, but "