git: 687cb66411c7 - main - tools/build: Bring in stdckdint.h if needed

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Wed, 08 Oct 2025 13:01:38 UTC
The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=687cb66411c7bc220ccb90cedc2f7486567d55b6

commit 687cb66411c7bc220ccb90cedc2f7486567d55b6
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2025-10-07 13:53:54 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2025-10-08 12:50:25 +0000

    tools/build: Bring in stdckdint.h if needed
    
    This is needed when bootstrapping libc, reallocarray.c and
    recallocarray.c include stdckdint.h now.
    
    Reviewed by:    emaste
    Fixes:  7233893e9496 ("lib{c,openbsd}: use ckd_mul() for overflow checking in re(c)allocarray")
    Differential Revision:  https://reviews.freebsd.org/D52932
---
 tools/build/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/build/Makefile b/tools/build/Makefile
index 09351900599a..fdec5f11311d 100644
--- a/tools/build/Makefile
+++ b/tools/build/Makefile
@@ -85,6 +85,10 @@ INCS+=		stdlib.h
 SRCS+=		reallocarray.c
 .endif
 
+.if !exists(${HOST_INCLUDE_ROOT}/stdckdint.h)
+INCS+=		stdckdint.h
+.endif
+
 .if exists(${HOST_INCLUDE_ROOT}/sys/stat.h)
 _WITH_UTIMENS!= grep -c utimensat ${HOST_INCLUDE_ROOT}/sys/stat.h || true
 .else