fortify-headers: fix build error when _REDIR_TIME64 is not defined
authorGeorgi Valkov <[email protected]>
Fri, 12 May 2023 23:22:12 +0000 (02:22 +0300)
committerHauke Mehrtens <[email protected]>
Thu, 18 May 2023 15:36:12 +0000 (17:36 +0200)
some targets do not define the _REDIR_TIME64 macro resulting in a
build error regression since ddfe5678a448ac8875e94f2fb4ddca67416fa14a
fix by checking if the macro is defined

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

Fixes: #12587
Fixes: ddfe5678a448 ("fortify-headers: fix inconsistent time_t version of ppoll")
Signed-off-by: Georgi Valkov <[email protected]>
(cherry picked from commit 9145c4fbcb655b2f56c76012da85cb203fdbc72b)

toolchain/fortify-headers/Makefile
toolchain/fortify-headers/patches/001-__ppoll_time64.patch

index bb67c33c3081e68db97cd1237faa37cd683dbdac..ea7a00e6e87df623103b75c10110b729a34aedce 100644 (file)
@@ -9,7 +9,7 @@ include $(INCLUDE_DIR)/target.mk
 
 PKG_NAME:=fortify-headers
 PKG_VERSION:=1.1
-PKG_RELEASE=2
+PKG_RELEASE=3
 
 PKG_SOURCE_URL:=http://dl.2f30.org/releases
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
index 9c6fea3e661d7ba3683dd89c5aab704e11f46ea3..05f8c717148e22a4ce0270b6fa52b455a5f87cda 100644 (file)
@@ -5,7 +5,7 @@
  }
  
 -#ifdef _GNU_SOURCE
-+#if defined(_GNU_SOURCE) && !_REDIR_TIME64
++#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)