diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2017-12-01 21:56:44 +0100 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2017-12-01 21:56:44 +0100 |
commit | 1c8dda3e435cfadaffe1f0cc062ad3c8ffbe84a7 (patch) | |
tree | dd26d5bc619271f8cccf0c9d7abdda9a1749d13f /package/iproute2/0003-lib-fix-multiple-strlcpy-definition.patch | |
parent | 57dcad243e6daefefbe21109e1fc97272053a7a0 (diff) | |
parent | 787a31fed42f98a8e2e6a0bd2079376c861436f2 (diff) | |
download | buildroot-1c8dda3e435cfadaffe1f0cc062ad3c8ffbe84a7.tar.gz buildroot-1c8dda3e435cfadaffe1f0cc062ad3c8ffbe84a7.zip |
Merge branch 'next'
This merges the next branch accumulated during the 2017.11 release
cycle back into the master branch.
A few conflicts had to be resolved:
- In the DEVELOPERS file, because Fabrice Fontaine was added as a
developer for libupnp in master, and for libupnp18 in
next. Resolution is simple: add him for both.
- linux/Config.in, because we updated the 4.13.x release used by
default in master, while we moved to 4.14 in next. Resolution: use
4.14.
- package/libupnp/libupnp.hash: a hash for the license file was added
in master, while the package was bumped into next. Resolution: keep
the hash for the license file, and keep the hash for the newest
version of libupnp.
- package/linux-headers/Config.in.host: default version of the kernel
headers for 4.13 was bumped to the latest 4.13.x in master, but was
changed to 4.14 in next. Resolution: use 4.14.
- package/samba4/: samba was bumped to 4.6.11 in master for security
reasons, but was bumped to 4.7.3 in next. Resolution: keep 4.7.3.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/iproute2/0003-lib-fix-multiple-strlcpy-definition.patch')
-rw-r--r-- | package/iproute2/0003-lib-fix-multiple-strlcpy-definition.patch | 103 |
1 files changed, 0 insertions, 103 deletions
diff --git a/package/iproute2/0003-lib-fix-multiple-strlcpy-definition.patch b/package/iproute2/0003-lib-fix-multiple-strlcpy-definition.patch deleted file mode 100644 index 05e9c38084..0000000000 --- a/package/iproute2/0003-lib-fix-multiple-strlcpy-definition.patch +++ /dev/null @@ -1,103 +0,0 @@ -From 5b55bbe48a29cf6a72cef9f424835f6244e66351 Mon Sep 17 00:00:00 2001 -From: Baruch Siach <baruch@tkos.co.il> -Date: Tue, 26 Sep 2017 13:45:21 +0300 -Subject: [PATCH] lib: fix multiple strlcpy definition - -Some C libraries, like uClibc and musl, provide BSD compatible -strlcpy(). Add check_strlcpy() to configure, and avoid defining strlcpy -and strlcat when the C library provides them. - -This fixes the following static link error: - -.../sysroot/usr/lib/libc.a(strlcpy.os): In function `strlcpy': -strlcpy.c:(.text+0x0): multiple definition of `strlcpy' -../lib/libutil.a(utils.o):utils.c:(.text+0x1ddc): first defined here -collect2: error: ld returned 1 exit status - -[baruch: backported from upstream submission to 4.13] -Signed-off-by: Baruch Siach <baruch@tkos.co.il> ---- -Upstream status: https://patchwork.ozlabs.org/patch/819705/ ---- - configure | 24 ++++++++++++++++++++++++ - lib/Makefile | 4 ++++ - lib/utils.c | 2 ++ - 3 files changed, 30 insertions(+) - -diff --git a/configure b/configure -index 88cbdb825689..4964b998059e 100755 ---- a/configure -+++ b/configure -@@ -325,6 +325,27 @@ EOF - rm -f $TMPDIR/dbtest.c $TMPDIR/dbtest - } - -+check_strlcpy() -+{ -+ cat >$TMPDIR/strtest.c <<EOF -+#include <string.h> -+int main(int argc, char **argv) { -+ char dst[10]; -+ strlcpy(dst, "test", sizeof(dst)); -+ return 0; -+} -+EOF -+ $CC -I$INCLUDE -o $TMPDIR/strtest $TMPDIR/strtest.c >/dev/null 2>&1 -+ if [ $? -eq 0 ] -+ then -+ echo "no" -+ else -+ echo "NEED_STRLCPY:=y" >>Config -+ echo "yes" -+ fi -+ rm -f $TMPDIR/strtest.c $TMPDIR/strtest -+} -+ - quiet_config() - { - cat <<EOF -@@ -396,6 +417,9 @@ check_mnl - echo -n "Berkeley DB: " - check_berkeley_db - -+echo -n "need for strlcpy: " -+check_strlcpy -+ - echo - echo -n "docs:" - check_docs -diff --git a/lib/Makefile b/lib/Makefile -index b7b1d5685b94..227c8211786b 100644 ---- a/lib/Makefile -+++ b/lib/Makefile -@@ -12,6 +12,10 @@ ifeq ($(HAVE_MNL),y) - CFLAGS += -DHAVE_LIBMNL $(shell $(PKG_CONFIG) libmnl --cflags) - endif - -+ifeq ($(NEED_STRLCPY),y) -+ CFLAGS += -DNEED_STRLCPY -+endif -+ - CFLAGS += -fPIC - - UTILOBJ = utils.o rt_names.o ll_types.o ll_proto.o ll_addr.o \ -diff --git a/lib/utils.c b/lib/utils.c -index 330ab073c206..f53dacae2e1f 100644 ---- a/lib/utils.c -+++ b/lib/utils.c -@@ -1231,6 +1231,7 @@ int get_real_family(int rtm_type, int rtm_family) - return rtm_family; - } - -+#ifdef NEED_STRLCPY - size_t strlcpy(char *dst, const char *src, size_t size) - { - if (size) { -@@ -1249,3 +1250,4 @@ size_t strlcat(char *dst, const char *src, size_t size) - - return dlen + strlcpy(dst + dlen, src, size - dlen); - } -+#endif --- -2.14.2 - |