![Peter Seiderer](/assets/img/avatar_default.png)
- rebased (and renumbered) 001-ell-rtnl-fix-compile-with-older-toolchains.patch - drop dynamic library dependency as no longer needed since upstream commits [1] and [2] - add two upstream patches to fix musl/uclibc compile [1] https://git.kernel.org/pub/scm/libs/ell/ell.git/commit/?id=e129cb4cd2270f308c1564e75859672643dd902b [2] https://git.kernel.org/pub/scm/libs/ell/ell.git/commit/?id=a4ac2cb0e14f564754f7e2067ac7dde0a9ab1914 Signed-off-by: Peter Seiderer <ps.report@gmx.net> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
48 lines
1.3 KiB
Diff
48 lines
1.3 KiB
Diff
From 3916c1cc32be205e185a8a56de5cde1b9ec60e81 Mon Sep 17 00:00:00 2001
|
|
From: Denis Kenzior <denkenz@gmail.com>
|
|
Date: Mon, 30 Nov 2020 13:00:11 -0600
|
|
Subject: [PATCH] build: Add rawmemchr to missing.h
|
|
|
|
For those systems (i.e. musl) that do not support this
|
|
|
|
[Upstream: https://git.kernel.org/pub/scm/libs/ell/ell.git/patch/?id=3916c1cc32be205e185a8a56de5cde1b9ec60e81]
|
|
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
|
|
---
|
|
configure.ac | 1 +
|
|
ell/missing.h | 10 ++++++++++
|
|
2 files changed, 11 insertions(+)
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index 1e5ead9..f34add1 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -98,6 +98,7 @@ AC_ARG_ENABLE(ubsan, AC_HELP_STRING([--enable-ubsan],
|
|
])
|
|
|
|
AC_CHECK_FUNCS(explicit_bzero)
|
|
+AC_CHECK_FUNCS(rawmemchr)
|
|
|
|
AC_CHECK_FUNC(signalfd, dummy=yes,
|
|
AC_MSG_ERROR(signalfd support is required))
|
|
diff --git a/ell/missing.h b/ell/missing.h
|
|
index 6b9b0fd..2a3e647 100644
|
|
--- a/ell/missing.h
|
|
+++ b/ell/missing.h
|
|
@@ -67,3 +67,13 @@ static inline void explicit_bzero(void *s, size_t n)
|
|
#ifndef SO_BINDTOIFINDEX
|
|
#define SO_BINDTOIFINDEX 62
|
|
#endif
|
|
+
|
|
+#ifndef HAVE_RAWMEMCHR
|
|
+static inline void *rawmemchr(const void *s, int c)
|
|
+{
|
|
+_Pragma("GCC diagnostic push")
|
|
+_Pragma("GCC diagnostic ignored \"-Wstringop-overflow=\"")
|
|
+ return memchr(s, c, (size_t) -1);
|
|
+_Pragma("GCC diagnostic pop")
|
|
+}
|
|
+#endif
|
|
--
|
|
2.29.2
|
|
|