]> code.delx.au - pulseaudio/blobdiff - src/modules/gconf/module-gconf.c
Remove unnecessary #includes
[pulseaudio] / src / modules / gconf / module-gconf.c
index 845ede50bc781a787d9c9dcfc155d8e4e06b7b0f..3bad911315a15f4673b08e779fd99670ea7933b5 100644 (file)
@@ -5,7 +5,7 @@
 
   PulseAudio is free software; you can redistribute it and/or modify
   it under the terms of the GNU Lesser General Public License as published
-  by the Free Software Foundation; either version 2 of the License,
+  by the Free Software Foundation; either version 2.1 of the License,
   or (at your option) any later version.
 
   PulseAudio is distributed in the hope that it will be useful, but
 #include <signal.h>
 #include <sys/types.h>
 #include <sys/wait.h>
-#include <fcntl.h>
 
 #include <pulse/xmalloc.h>
 #include <pulsecore/module.h>
 #include <pulsecore/core.h>
-#include <pulsecore/llist.h>
 #include <pulsecore/core-util.h>
 #include <pulsecore/log.h>
 #include <pulse/mainloop-api.h>
@@ -52,9 +50,6 @@ PA_MODULE_LOAD_ONCE(TRUE);
 #define MAX_MODULES 10
 #define BUF_MAX 2048
 
-/* #undef PA_GCONF_HELPER */
-/* #define PA_GCONF_HELPER "/home/lennart/projects/pulseaudio/src/gconf-helper" */
-
 struct module_item {
     char *name;
     char *args;
@@ -343,7 +338,11 @@ int pa__init(pa_module*m) {
     u->io_event = NULL;
     u->buf_fill = 0;
 
-    if ((u->fd = pa_start_child_for_read(PA_GCONF_HELPER, NULL, &u->pid)) < 0)
+    if ((u->fd = pa_start_child_for_read(
+#if defined(__linux__) && !defined(__OPTIMIZE__)
+                              pa_run_from_build_tree() ? PA_BUILDDIR "/gconf-helper" :
+#endif
+                 PA_GCONF_HELPER, NULL, &u->pid)) < 0)
         goto fail;
 
     u->io_event = m->core->mainloop->io_new(