aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2023-02-24 14:43:57 +0000
committerEd Maste <emaste@FreeBSD.org>2023-03-02 00:59:26 +0000
commitc5e54e56e68aa50beb7d2a7b8ae6611490a7ba9e (patch)
tree4921043f848863d1325a4d2e68219f6304e23f7c
parent005cca8361a4932d03bd93fefa998fff69a1e136 (diff)
downloadsrc-c5e54e56e68aa50beb7d2a7b8ae6611490a7ba9e.tar.gz
src-c5e54e56e68aa50beb7d2a7b8ae6611490a7ba9e.zip
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
-rw-r--r--tools/build/Makefile4
1 files changed, 4 insertions, 0 deletions
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