openwrt/toolchain/fortify-headers/patches/001-__ppoll_time64.patch
Georgi Valkov 9145c4fbcb fortify-headers: fix build error when _REDIR_TIME64 is not defined
some targets do not define the _REDIR_TIME64 macro resulting in a
build error regression since ddfe5678a4
fix by checking if the macro is defined

[1] https://github.com/openwrt/openwrt/issues/12587

Fixes: 
Fixes: ddfe5678a4 ("fortify-headers: fix inconsistent time_t version of ppoll")
Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
2023-05-13 14:09:53 +02:00

12 lines
390 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) && !(defined(_REDIR_TIME64) && _REDIR_TIME64)
#undef ppoll
_FORTIFY_FN(ppoll) int ppoll(struct pollfd *__f, nfds_t __n, const struct timespec *__s,
const sigset_t *__m)