mirror of
https://github.com/openwrt/openwrt.git
synced 2025-03-13 15:56:55 +00:00
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>
12 lines
362 B
Diff
12 lines
362 B
Diff
--- 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)
|