Fix: all lttng-ust source files should be tagged _LGPL_SOURCE
[lttng-ust.git] / liblttng-ust-dl / lttng-ust-dl.c
index e4cb42068ed1548ab10eaa4a1b850b2a19d45eb8..e457e7a3cbdfa69697c3794465a82a66681a0ec3 100644 (file)
@@ -17,9 +17,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
-#define _LGPL_SOURCE
 #define _GNU_SOURCE
-
+#define _LGPL_SOURCE
 #include <limits.h>
 #include <stdio.h>
 #include <sys/types.h>
@@ -27,6 +26,7 @@
 
 #include <lttng/ust-dlfcn.h>
 #include <lttng/ust-elf.h>
+#include <helper.h>
 #include "usterr-signal-safe.h"
 
 /* Include link.h last else it conflicts with ust-dlfcn. */
@@ -136,7 +136,7 @@ void *dlopen(const char *filename, int flag)
                ret = dlinfo(handle, RTLD_DI_LINKMAP, &p);
                if (ret != -1 && p != NULL && p->l_addr != 0) {
                        lttng_ust_dl_dlopen((void *) p->l_addr, p->l_name,
-                               __builtin_return_address(0));
+                               LTTNG_UST_CALLER_IP());
                }
        }
 
@@ -152,7 +152,7 @@ int dlclose(void *handle)
                ret = dlinfo(handle, RTLD_DI_LINKMAP, &p);
                if (ret != -1 && p != NULL && p->l_addr != 0) {
                        tracepoint(lttng_ust_dl, dlclose,
-                               __builtin_return_address(0),
+                               LTTNG_UST_CALLER_IP(),
                                (void *) p->l_addr);
                }
        }
This page took 0.033249 seconds and 4 git commands to generate.