summaryrefslogtreecommitdiffstats
path: root/src/pulsecore
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulsecore')
-rw-r--r--src/pulsecore/core-util.c3
-rw-r--r--src/pulsecore/core-util.h5
2 files changed, 5 insertions, 3 deletions
diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
index 796ff57c..48231985 100644
--- a/src/pulsecore/core-util.c
+++ b/src/pulsecore/core-util.c
@@ -2991,9 +2991,6 @@ pa_bool_t pa_run_from_build_tree(void) {
char *rp;
pa_bool_t b = FALSE;
- /* We abuse __OPTIMIZE__ as a check whether we are a debug build
- * or not. */
-
if ((rp = pa_readlink("/proc/self/exe"))) {
b = pa_startswith(rp, PA_BUILDDIR);
pa_xfree(rp);
diff --git a/src/pulsecore/core-util.h b/src/pulsecore/core-util.h
index 80b47395..32641a3f 100644
--- a/src/pulsecore/core-util.h
+++ b/src/pulsecore/core-util.h
@@ -254,8 +254,13 @@ size_t pa_pipe_buf(int fd);
void pa_reset_personality(void);
+/* We abuse __OPTIMIZE__ as a check whether we are a debug build
+ * or not. If we are and are run from the build tree then we
+ * override the search path to point to our build tree */
#if defined(__linux__) && !defined(__OPTIMIZE__)
pa_bool_t pa_run_from_build_tree(void);
+#else
+static inline pa_bool_t pa_run_from_build_tree(void) {return FALSE;}
#endif
const char *pa_get_temp_dir(void);