This patch fix a build error with the musl C library. The patch is originally taken from Alpine Linux: http://git.alpinelinux.org/cgit/aports/tree/main/mpd/fix-musl.patch.
musl declares pthread_equal both as a macro and as a function. Without the parentheses the preprocessor expands pthread_equal to ::((id)==(other.id)) which obviously fails. Using parentheses prevents the preprocessor from expansion and the compiler looks up for the function declaration of pthread_equal in the global namespace. Signed-off-by: Jörg Krause <[email protected]> --- src/thread/Id.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/thread/Id.hxx b/src/thread/Id.hxx index 7b10de0..c4e514e 100644 --- a/src/thread/Id.hxx +++ b/src/thread/Id.hxx @@ -84,7 +84,7 @@ public: #ifdef WIN32 return id == other.id; #else - return ::pthread_equal(id, other.id); + return (::pthread_equal)(id, other.id); #endif } -- 2.1.3 _______________________________________________ mpd-devel mailing list [email protected] http://mailman.blarg.de/listinfo/mpd-devel
