X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=include%2Flttng%2Fust-dlfcn.h;h=7cd5bf4811e9e2d3527dfe716f88cd187362fa91;hb=d1194248c71fd4767382b4ea40dfa1cea3db1fd7;hp=786d3b5a9a2930a57b6ee51be6d8a69c53ba8c85;hpb=f02baefb3ba4d5493816d63f65625ba4269224d2;p=lttng-ust.git diff --git a/include/lttng/ust-dlfcn.h b/include/lttng/ust-dlfcn.h index 786d3b5a..7cd5bf48 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, @@ -46,7 +47,11 @@ #define dlclose glibc_dlclose_proto_lies_about_leafness #define dlsym glibc_dlsym_proto_lies_about_leafness #define dlerror glibc_dlerror_proto_lies_about_leafness +#define dlmopen glibc_dlmopen_proto_lies_about_leafness +#define dlvsym glibc_dlvsym_proto_lies_about_leafness #include +#undef dlvsym +#undef dlmopen #undef dlerror #undef dlsym #undef dlclose @@ -56,6 +61,15 @@ 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); +#ifdef __USE_GNU +extern void *dlmopen(Lmid_t __nsid, const char *__file, int __mode); +extern void *dlvsym(void *__restrict __handle, + __const char *__restrict __name, + __const char *__restrict __version); +#endif +#else +#include +#endif /* __GLIBC__ */ #endif /* _LTTNG_UST_DLFCN_H */