From c5e54e56e68aa50beb7d2a7b8ae6611490a7ba9e Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Fri, 24 Feb 2023 09:43:57 -0500 Subject: tools/build: Hide spurious errors if sys/stat.h does not exist Reviewed by: brooks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D38757 --- tools/build/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/build/Makefile b/tools/build/Makefile index 53a735ae6295..c7875622b042 100644 --- a/tools/build/Makefile +++ b/tools/build/Makefile @@ -68,7 +68,11 @@ INCS+= stdlib.h SRCS+= reallocarray.c .endif +.if exists(${HOST_INCLUDE_ROOT}/sys/stat.h) _WITH_UTIMENS!= grep -c utimensat ${HOST_INCLUDE_ROOT}/sys/stat.h || true +.else +_WITH_UTIMENS= 0 +.endif .if ${_WITH_UTIMENS} == 0 SYSINCS+= stat.h SRCS+= futimens.c utimensat.c -- cgit v1.2.3