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: #12587
Fixes: ddfe5678a4 ("fortify-headers: fix inconsistent time_t version of ppoll")
Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
This commit is contained in:
Georgi Valkov 2023-05-13 02:22:12 +03:00 committed by Hauke Mehrtens
parent 4e5aac4729
commit 9145c4fbcb
2 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@ include $(INCLUDE_DIR)/target.mk
PKG_NAME:=fortify-headers PKG_NAME:=fortify-headers
PKG_VERSION:=1.1 PKG_VERSION:=1.1
PKG_RELEASE=2 PKG_RELEASE=3
PKG_SOURCE_URL:=https://dl.2f30.org/releases PKG_SOURCE_URL:=https://dl.2f30.org/releases
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz

View File

@ -5,7 +5,7 @@
} }
-#ifdef _GNU_SOURCE -#ifdef _GNU_SOURCE
+#if defined(_GNU_SOURCE) && !_REDIR_TIME64 +#if defined(_GNU_SOURCE) && !(defined(_REDIR_TIME64) && _REDIR_TIME64)
#undef ppoll #undef ppoll
_FORTIFY_FN(ppoll) int ppoll(struct pollfd *__f, nfds_t __n, const struct timespec *__s, _FORTIFY_FN(ppoll) int ppoll(struct pollfd *__f, nfds_t __n, const struct timespec *__s,
const sigset_t *__m) const sigset_t *__m)