ladspa-sink: fix search path

Having a single level macro for stringizing LADSPA_PATH doesn't work,
because the '#' preprocessor operator doesn't expand any macros in its
parameter. As a result, we used the string "LADSPA_PATH" as the search
path, and obviously no plugins were ever found.

This adds a two-level macro in macro.h and uses that to expand and
stringize LADSPA_PATH.

Bug link: https://bugs.freedesktop.org/show_bug.cgi?id=107078
This commit is contained in:
Tanu Kaskinen 2018-07-04 14:25:26 +03:00
parent c4efbc81b0
commit 1b377d4428
2 changed files with 12 additions and 8 deletions

View file

@ -298,6 +298,12 @@ static inline size_t PA_ALIGN(size_t l) {
? (-1 - PA_INT_TYPE_MAX(type)) \
: (type) 0))
/* The '#' preprocessor operator doesn't expand any macros that are in the
* parameter, which is why we need a separate macro for those cases where the
* parameter contains a macro that needs expanding. */
#define PA_STRINGIZE(x) #x
#define PA_EXPAND_AND_STRINGIZE(x) PA_STRINGIZE(x)
/* We include this at the very last place */
#include <pulsecore/log.h>