Add support for musl libc to ust-dlfcn.h
[lttng-ust.git] / include / lttng / ust-dlfcn.h
index 786d3b5a9a2930a57b6ee51be6d8a69c53ba8c85..7471d94f689e328b77185cbbb91dc8823b957b6e 100644 (file)
@@ -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,
@@ -56,6 +57,9 @@ extern void *dlopen(__const char *__file, int __mode);
 extern int dlclose(void *__handle) __nonnull ((1));
 extern void *dlsym(void *__restrict __handle,
                __const char *__restrict __name) __nonnull ((2));
-extern char *dlerror (void);
+extern char *dlerror(void);
+#else
+#include <dlfcn.h>
+#endif /* __GLIBC__ */
 
 #endif /* _LTTNG_UST_DLFCN_H */
This page took 0.023595 seconds and 4 git commands to generate.