[lttng-dev] [PATCH lttng-ust 1/4] Add support for musl libc to ust-dlfcn.h

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Tue May 31 04:38:20 UTC 2016


All merged into master, stable-2.8. The commit marked
"fix" that apply to 2.7 has been backported.

----- On May 30, 2016, at 10:31 PM, Michael Jeanson mjeanson at efficios.com wrote:

> Signed-off-by: Michael Jeanson <mjeanson at efficios.com>
> ---
> 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 c92f1bb..7471d94 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 <dlfcn.h>
> +#endif /* __GLIBC__ */
> 
> #endif /* _LTTNG_UST_DLFCN_H */
> --
> 2.7.4

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com


More information about the lttng-dev mailing list