From 48b84ecdcbc08278e0fda1d4f1d7e66c90af85ea Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 22 Aug 2024 04:34:08 +0200 Subject: [PATCH] libsepol: make reallocarray check more robust Some cross-compiler toolchains dislike the usage of -o /dev/null and fail with: ld: final link failed: file truncated As stdin and stdout is already redirected to /dev/null there is no need for gcc -o /dev/null. This fixes an Buildroot autobuild failure for libsepol package: http://autobuild.buildroot.net/results/72b/72baaab4658254f4c5b3348298af1d5c891cacd6/ Signed-off-by: Waldemar Brodkorb --- libsepol/src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsepol/src/Makefile b/libsepol/src/Makefile index 7b0e84460..267a3ca4b 100644 --- a/libsepol/src/Makefile +++ b/libsepol/src/Makefile @@ -31,7 +31,7 @@ endif # check for reallocarray(3) availability H := \# -ifeq (yes,$(shell printf '${H}include \nint main(void){return reallocarray(NULL,0,0)==NULL;}' | $(CC) $(CFLAGS) $(LDFLAGS) -x c -o /dev/null - >/dev/null 2>&1 && echo yes)) +ifeq (yes,$(shell printf '${H}include \nint main(void){return reallocarray(NULL,0,0)==NULL;}' | $(CC) $(CFLAGS) $(LDFLAGS) -x c - >/dev/null 2>&1 && echo yes)) override CFLAGS += -DHAVE_REALLOCARRAY endif