From 30307a67b48641875b122d8f832bbfb454e95d92 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Mon, 30 May 2016 16:31:30 -0400 Subject: [PATCH] Add support for musl libc to ust-dlfcn.h Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- include/lttng/ust-dlfcn.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/lttng/ust-dlfcn.h b/include/lttng/ust-dlfcn.h index c92f1bb6f..7471d94f6 100644 --- a/include/lttng/ust-dlfcn.h +++ b/include/lttng/ust-dlfcn.h @@ -31,6 +31,7 @@ #error "Please include lttng/ust-dlfcn.h before dlfcn.h." #endif /* _DLFCN_H */ +#ifdef __GLIBC__ /* * glibc declares dlsym() and dlerror() with __attribute__((leaf)) (see * THROW annotation). Unfortunately, this is not in sync with reality, @@ -57,5 +58,8 @@ extern int dlclose(void *__handle) __nonnull ((1)); extern void *dlsym(void *__restrict __handle, __const char *__restrict __name) __nonnull ((2)); extern char *dlerror(void); +#else +#include +#endif /* __GLIBC__ */ #endif /* _LTTNG_UST_DLFCN_H */