Skip to content
Snippets Groups Projects
Commit 05c2e9ff authored by Stefan Schmidt's avatar Stefan Schmidt
Browse files

wpantund: Fix build break with missing strlcpy symbol


The wpantund project has some m4 macro to check for strlcpy and strlcat
being available. We are hitting a corner case here (maybe due to musl)
where strlcpy is detected but the system still does not build.

Adding a patch to the project to fix this case which was also submitted
upstream and waits for review.

Signed-off-by: default avatarStefan Schmidt <stefan.schmidt@huawei.com>
parent a1ac4eb6
No related branches found
No related tags found
No related merge requests found
From 797c56efbb8aa8653549a4e4a38d4c9f2ceace28 Mon Sep 17 00:00:00 2001
From: Stefan Schmidt <stefan.schmidt@huawei.com>
Date: Fri, 21 May 2021 22:44:31 +0200
Subject: [PATCH] util/netif-mgmt: only include missing strlcpy header if
actually missing
In commit 4e2ef143046a0c89afe6fd66acf5b7a7f35e8356 this header was
added unconditionally. For my system (Yocto with musl) this results in
strlcpy being redefined to __missing_strlcpy in all cases. No matter if
strlcpy is available or not.
Given it is available and the nl.m4 macros detects this, the libstrlcpy.la
helper is not built which results in:
netif-mgmt.c:386: more undefined references to `___missing_strlcpy' follow
Upstream-Status: Submitted [https://github.com/openthread/wpantund/pull/497]
Signed-off-by: Stefan Schmidt <stefan.schmidt@huawei.com>
---
src/util/netif-mgmt.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/util/netif-mgmt.c b/src/util/netif-mgmt.c
index 3fffb2e..8fa0107 100644
--- a/src/util/netif-mgmt.c
+++ b/src/util/netif-mgmt.c
@@ -69,7 +69,9 @@
#define IFEF_NOAUTOIPV6LL 0x2000 /* Interface IPv6 LinkLocal address not provided by kernel */
#endif
+#ifdef MISSING_STRLCPY
#include "missing/strlcpy/strlcpy.h"
+#endif
#ifndef SIOCSIFLLADDR
#define SIOCSIFLLADDR SIOCSIFHWADDR
...@@ -13,7 +13,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=e7820bc7f7d1638a6b54fc2e8d7fb103 \ ...@@ -13,7 +13,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=e7820bc7f7d1638a6b54fc2e8d7fb103 \
file://third_party/pt/LICENSE;md5=dcd598b69cad786beea33da7b1ae14b7 \ file://third_party/pt/LICENSE;md5=dcd598b69cad786beea33da7b1ae14b7 \
" "
SRC_URI = "gitsm://github.com/openthread/wpantund.git;protocol=https" SRC_URI = "gitsm://github.com/openthread/wpantund.git;protocol=https \
file://0001-util-netif-mgmt-only-include-missing-strlcpy-header-.patch \
"
PV = "0.07.01+git${SRCPV}" PV = "0.07.01+git${SRCPV}"
SRCREV = "820468161c87816a3e94366ebbe2a932650416e3" SRCREV = "820468161c87816a3e94366ebbe2a932650416e3"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment