X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=liblttng-ust%2Flttng-ust-comm.c;h=204db9de37c6ace3f9a99041b27e4dd95fd52698;hb=dc325c1d762bbbdc1866e590f4649078f8600664;hp=3ace61fcc9ec075f114d7196946bb9ad97ed43d6;hpb=d0c8f180cac01b888a81ce8abb47ce9e57925a53;p=lttng-ust.git diff --git a/liblttng-ust/lttng-ust-comm.c b/liblttng-ust/lttng-ust-comm.c index 3ace61fc..204db9de 100644 --- a/liblttng-ust/lttng-ust-comm.c +++ b/liblttng-ust/lttng-ust-comm.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -53,9 +54,6 @@ #include "context-internal.h" #include "ust-compat.h" -/* Concatenate lttng ust shared library name with its major version number. */ -#define LTTNG_UST_LIB_SO_NAME "liblttng-ust.so." lttng_ust_stringify(CONFIG_LTTNG_UST_LIBRARY_VERSION_MAJOR) - /* * Has lttng ust comm constructor been called ? */ @@ -639,11 +637,11 @@ int register_to_sessiond(int socket, enum ustctl_socket_type type) return ustcomm_send_reg_msg(socket, type, CAA_BITS_PER_LONG, - lttng_alignof(uint8_t) * CHAR_BIT, - lttng_alignof(uint16_t) * CHAR_BIT, - lttng_alignof(uint32_t) * CHAR_BIT, - lttng_alignof(uint64_t) * CHAR_BIT, - lttng_alignof(unsigned long) * CHAR_BIT); + lttng_ust_rb_alignof(uint8_t) * CHAR_BIT, + lttng_ust_rb_alignof(uint16_t) * CHAR_BIT, + lttng_ust_rb_alignof(uint32_t) * CHAR_BIT, + lttng_ust_rb_alignof(uint64_t) * CHAR_BIT, + lttng_ust_rb_alignof(unsigned long) * CHAR_BIT); } static @@ -2093,7 +2091,7 @@ void __attribute__((constructor)) lttng_ust_init(void) * liblttng-ust.so to increment the dynamic loader's internal refcount for * this library so it never becomes zero, thus never gets unloaded from the * address space of the process. Since we are already running in the - * constructor of the LTTNG_UST_LIB_SO_NAME library, calling dlopen will + * constructor of the LTTNG_UST_LIB_SONAME library, calling dlopen will * simply increment the refcount and no additionnal work is needed by the * dynamic loader as the shared library is already loaded in the address * space. As a safe guard, we use the RTLD_NODELETE flag to prevent @@ -2101,9 +2099,9 @@ void __attribute__((constructor)) lttng_ust_init(void) * never happen). Do the return value check but discard the handle at the * end of the function as it's not needed. */ - handle = dlopen(LTTNG_UST_LIB_SO_NAME, RTLD_LAZY | RTLD_NODELETE); + handle = dlopen(LTTNG_UST_LIB_SONAME, RTLD_LAZY | RTLD_NODELETE); if (!handle) { - ERR("dlopen of liblttng-ust shared library (%s).", LTTNG_UST_LIB_SO_NAME); + ERR("dlopen of liblttng-ust shared library (%s).", LTTNG_UST_LIB_SONAME); } /*