summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-networking/recipes-connectivity/dibbler/dibbler/0001-linux-port-Rename-pthread_mutex_t-variable-lock.patch74
-rw-r--r--meta-networking/recipes-connectivity/dibbler/dibbler_git.bb3
2 files changed, 1 insertions, 76 deletions
diff --git a/meta-networking/recipes-connectivity/dibbler/dibbler/0001-linux-port-Rename-pthread_mutex_t-variable-lock.patch b/meta-networking/recipes-connectivity/dibbler/dibbler/0001-linux-port-Rename-pthread_mutex_t-variable-lock.patch
deleted file mode 100644
index 346a56a9ad..0000000000
--- a/meta-networking/recipes-connectivity/dibbler/dibbler/0001-linux-port-Rename-pthread_mutex_t-variable-lock.patch
+++ /dev/null
@@ -1,74 +0,0 @@
1From 630086cf1b3fba71822319a268d3711734cd6aa8 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 31 Jan 2019 12:56:13 -0800
4Subject: [PATCH] linux-port: Rename pthread_mutex_t variable 'lock'
5
6lock is also used by libc++ in std namespace and using it here causes
7clang to fail e.g.
8
9dibbler-client.cpp:47:25: error: reference to 'lock' is ambiguous
10 pthread_mutex_lock(&lock);
11 ^
12../../../../../../../workspace/sources/dibbler/Port-linux/dibbler-client.cpp:29:26: note: candidate found by name lookup is 'lock'
13extern ::pthread_mutex_t lock;
14 ^
15/mnt/a/yoe/build/tmp/work/aarch64-yoe-linux/dibbler/1.0.1+1.0.2RC1+gitc4b0ed52e751da7823dd9a36e91f93a6310e5525-r0/recipe-sysroot/usr/include/c++/v1/mutex:446:1: note: candidate found by name lookup is 'std::__1::lock'
16lock(_L0& __l0, _L1& __l1, _L2& __l2, _L3& ...__l3)
17
18Upstream-Status: Submitted [https://github.com/tomaszmrugalski/dibbler/pull/37]
19
20Signed-off-by: Khem Raj <raj.khem@gmail.com>
21---
22 Port-linux/dibbler-client.cpp | 6 +++---
23 Port-linux/lowlevel-linux-link-state.c | 6 +++---
24 2 files changed, 6 insertions(+), 6 deletions(-)
25
26diff --git a/Port-linux/dibbler-client.cpp b/Port-linux/dibbler-client.cpp
27index 78f34241..b5ebb9f0 100644
28--- a/Port-linux/dibbler-client.cpp
29+++ b/Port-linux/dibbler-client.cpp
30@@ -26,7 +26,7 @@ using namespace std;
31
32 #define IF_RECONNECTED_DETECTED -1
33
34-extern pthread_mutex_t lock;
35+extern pthread_mutex_t dibbler_lock;
36
37 TDHCPClient* ptr = 0;
38
39@@ -44,8 +44,8 @@ void signal_handler(int n) {
40 #ifdef MOD_CLNT_CONFIRM
41 void signal_handler_of_linkstate_change(int n) {
42 Log(Notice) << "Network switch off event detected. initiating CONFIRM." << LogEnd;
43- pthread_mutex_lock(&lock);
44- pthread_mutex_unlock(&lock);
45+ pthread_mutex_lock(&dibbler_lock);
46+ pthread_mutex_unlock(&dibbler_lock);
47 }
48 #endif
49
50diff --git a/Port-linux/lowlevel-linux-link-state.c b/Port-linux/lowlevel-linux-link-state.c
51index 76293ea1..e6b94063 100644
52--- a/Port-linux/lowlevel-linux-link-state.c
53+++ b/Port-linux/lowlevel-linux-link-state.c
54@@ -34,7 +34,7 @@ volatile int * notifier = 0;
55 int isDone = 0;
56 pthread_t parent_id;
57 pthread_t ntid;
58-pthread_mutex_t lock;
59+pthread_mutex_t dibbler_lock;
60
61 struct state {
62 int id;
63@@ -86,9 +86,9 @@ void link_state_changed(int ifindex)
64 {
65 if (changed_links->cnt<16)
66 changed_links->ifindex[changed_links->cnt++] = ifindex;
67- pthread_mutex_lock(&lock);
68+ pthread_mutex_lock(&dibbler_lock);
69 *notifier = 1; /* notify that change has occured */
70- pthread_mutex_unlock(&lock);
71+ pthread_mutex_unlock(&dibbler_lock);
72 pthread_kill(parent_id,SIGUSR1);
73 } else
74 {
diff --git a/meta-networking/recipes-connectivity/dibbler/dibbler_git.bb b/meta-networking/recipes-connectivity/dibbler/dibbler_git.bb
index 90051a319a..c2f4827161 100644
--- a/meta-networking/recipes-connectivity/dibbler/dibbler_git.bb
+++ b/meta-networking/recipes-connectivity/dibbler/dibbler_git.bb
@@ -5,11 +5,10 @@ HOMEPAGE = "http://klub.com.pl/dhcpv6"
5LICENSE = "GPLv2" 5LICENSE = "GPLv2"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=7236695bb6d4461c105d685a8b61c4e3" 6LIC_FILES_CHKSUM = "file://LICENSE;md5=7236695bb6d4461c105d685a8b61c4e3"
7 7
8SRCREV = "c4b0ed52e751da7823dd9a36e91f93a6310e5525" 8SRCREV = "a7c6cf58a88a510cb00841351e75030ce78d36bf"
9 9
10SRC_URI = "git://github.com/tomaszmrugalski/dibbler \ 10SRC_URI = "git://github.com/tomaszmrugalski/dibbler \
11 file://dibbler_fix_getSize_crash.patch \ 11 file://dibbler_fix_getSize_crash.patch \
12 file://0001-linux-port-Rename-pthread_mutex_t-variable-lock.patch \
13 " 12 "
14PV = "1.0.1+1.0.2RC1+git${SRCREV}" 13PV = "1.0.1+1.0.2RC1+git${SRCREV}"
15 14