aboutsummaryrefslogtreecommitdiffstats
path: root/toolchain
diff options
context:
space:
mode:
authorGeorgi Valkov <gvalkov@gmail.com>2023-05-10 03:02:29 +0300
committerHauke Mehrtens <hauke@hauke-m.de>2023-05-18 17:36:03 +0200
commit4d6638464cc2976b1ee0cd784f06a49e4202c5c6 (patch)
tree8d7a5ca599f88cafaf89a0d5ba464c9b41076547 /toolchain
parent695a22ab157577a4143f7a76bcbdaa59305905e3 (diff)
downloadupstream-4d6638464cc2976b1ee0cd784f06a49e4202c5c6.tar.gz
upstream-4d6638464cc2976b1ee0cd784f06a49e4202c5c6.tar.bz2
upstream-4d6638464cc2976b1ee0cd784f06a49e4202c5c6.zip
fortify-headers: fix inconsistent time_t version of ppoll
Bug: fortify/poll.h includes poll.h, which redirects ppoll to __ppoll_time64 if the _REDIR_TIME64 macro is 1. Then fortify/poll.h will #undef ppoll and use the 32 bit version. Fix: we should not do this when _REDIR_TIME64 is 1. [1] https://forum.openwrt.org/t/idle-cpu-usage-of-usbmuxd/140331/15 [2] https://github.com/openwrt/openwrt/issues/12574 Signed-off-by: Georgi Valkov <gvalkov@gmail.com> (cherry picked from commit ddfe5678a448ac8875e94f2fb4ddca67416fa14a)
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/fortify-headers/Makefile2
-rw-r--r--toolchain/fortify-headers/patches/001-__ppoll_time64.patch11
2 files changed, 12 insertions, 1 deletions
diff --git a/toolchain/fortify-headers/Makefile b/toolchain/fortify-headers/Makefile
index a6151bb2f1..bb67c33c30 100644
--- a/toolchain/fortify-headers/Makefile
+++ b/toolchain/fortify-headers/Makefile
@@ -9,7 +9,7 @@ include $(INCLUDE_DIR)/target.mk
PKG_NAME:=fortify-headers
PKG_VERSION:=1.1
-PKG_RELEASE=1
+PKG_RELEASE=2
PKG_SOURCE_URL:=http://dl.2f30.org/releases
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
diff --git a/toolchain/fortify-headers/patches/001-__ppoll_time64.patch b/toolchain/fortify-headers/patches/001-__ppoll_time64.patch
new file mode 100644
index 0000000000..9c6fea3e66
--- /dev/null
+++ b/toolchain/fortify-headers/patches/001-__ppoll_time64.patch
@@ -0,0 +1,11 @@
+--- a/include/poll.h
++++ b/include/poll.h
+@@ -39,7 +39,7 @@ _FORTIFY_FN(poll) int poll(struct pollfd
+ return __orig_poll(__f, __n, __s);
+ }
+
+-#ifdef _GNU_SOURCE
++#if defined(_GNU_SOURCE) && !_REDIR_TIME64
+ #undef ppoll
+ _FORTIFY_FN(ppoll) int ppoll(struct pollfd *__f, nfds_t __n, const struct timespec *__s,
+ const sigset_t *__m)