From: Michael Jeanson Date: Mon, 30 May 2016 20:31:30 +0000 (-0400) Subject: Add support for musl libc to ust-dlfcn.h X-Git-Tag: v2.8.1~12 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=fafbb4a9f8d1153b2517ba9714196696009785a2;p=lttng-ust.git Add support for musl libc to ust-dlfcn.h Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/include/lttng/ust-dlfcn.h b/include/lttng/ust-dlfcn.h index c92f1bb6..7471d94f 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 */