• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/lttng-libust/0003-Validate-the-presence-of-dlmopen-at-configure-time.patch
Thomas PetazzoniThomas Petazzoni committed 0f67757f69901 Mar 2017
Raw file
Source viewDiff to previous
 
1
From 42330adcefcd1830dad89e2a960c93d8dd1da125 Mon Sep 17 00:00:00 2001
2
From: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
3
Date: Tue, 21 Feb 2017 16:00:27 -0500
4
Subject: [PATCH] Validate the presence of dlmopen at configure time
5
​
6
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
7
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
8
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
9
[Backport from upstream commit 42330adcefcd1830dad89e2a960c93d8dd1da125.]
10
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
11
---
12
 configure.ac                   | 8 ++++++++
13
 liblttng-ust-dl/lttng-ust-dl.c | 8 ++++++++
14
 liblttng-ust-dl/ust_dl.h       | 2 ++
15
 3 files changed, 18 insertions(+)
16
​
17
diff --git a/configure.ac b/configure.ac
18
index 450b43b..023cfd4 100644
19
--- a/configure.ac
20
+++ b/configure.ac
21
@@ -125,15 +125,23 @@ AS_IF([test "x${ax_cv_sys_weak_alias}" = "xno"], [
22
 # Checks for libraries.
23
 AC_CHECK_LIB([dl], [dlopen], [
24
    have_libdl=yes
25
+   libdl_name=dl
26
 ], [
27
    #libdl not found, check for dlopen in libc.
28
    AC_CHECK_LIB([c], [dlopen], [
29
        have_libc_dl=yes
30
+       libdl_name=c
31
    ], [
32
        AC_MSG_ERROR([Cannot find dlopen in libdl nor libc. Use [LDFLAGS]=-Ldir to specify their location.])
33
    ])
34
 ])
35
 
36
+# Check if libdl has dlmopen support.
37
+AH_TEMPLATE([HAVE_DLMOPEN], ["Define to 1 if dlmopen is available."])
38
+AC_CHECK_LIB([$libdl_name], [dlmopen],
39
+   [AC_DEFINE([HAVE_DLMOPEN], [1])]
40
+)
41
+
42
 AM_CONDITIONAL([LTTNG_UST_BUILD_WITH_LIBDL], [test "x$have_libdl" = "xyes"])
43
 AM_CONDITIONAL([LTTNG_UST_BUILD_WITH_LIBC_DL], [test "x$have_libc_dl" = "xyes"])
44
 
45
diff --git a/liblttng-ust-dl/lttng-ust-dl.c b/liblttng-ust-dl/lttng-ust-dl.c
46
index b0737b6..ce2ae0e 100644
47
--- a/liblttng-ust-dl/lttng-ust-dl.c
48
+++ b/liblttng-ust-dl/lttng-ust-dl.c
49
@@ -38,8 +38,10 @@
50
 #include "ust_dl.h"
51
 
52
 static void *(*__lttng_ust_plibc_dlopen)(const char *filename, int flags);
53
+#ifdef HAVE_DLMOPEN
54
 static void *(*__lttng_ust_plibc_dlmopen)(Lmid_t nsid, const char *filename,
55
        int flags);
56
+#endif
57
 static int (*__lttng_ust_plibc_dlclose)(void *handle);
58
 
59
 static
60
@@ -55,6 +57,7 @@ void *_lttng_ust_dl_libc_dlopen(const char *filename, int flags)
61
    return __lttng_ust_plibc_dlopen(filename, flags);
62
 }
63
 
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.