Date: Wed, 13 Aug 2025 22:39:43 GMT From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= <des@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: c989e3cc3da1 - main - certctl: Fix bootstrap build Message-ID: <202508132239.57DMdha8003412@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=c989e3cc3da1bfd8ac3ec5a05d1e86ab8ff719f7 commit c989e3cc3da1bfd8ac3ec5a05d1e86ab8ff719f7 Author: Dag-Erling Smørgrav <des@FreeBSD.org> AuthorDate: 2025-08-13 22:38:52 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2025-08-13 22:39:21 +0000 certctl: Fix bootstrap build Fixes: 81d8827ad875 ("certctl: Reimplement in C") --- usr.sbin/certctl/Makefile | 4 ++++ usr.sbin/certctl/certctl.c | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/usr.sbin/certctl/Makefile b/usr.sbin/certctl/Makefile index 5430dbf24853..6900f0ce3b65 100644 --- a/usr.sbin/certctl/Makefile +++ b/usr.sbin/certctl/Makefile @@ -7,4 +7,8 @@ LIBADD= crypto HAS_TESTS= SUBDIR.${MK_TESTS}= tests +.ifdef BOOTSTRAPPING +CFLAGS+=-DBOOTSTRAPPING +.endif + .include <bsd.prog.mk> diff --git a/usr.sbin/certctl/certctl.c b/usr.sbin/certctl/certctl.c index 6687e56f23b4..365870167aeb 100644 --- a/usr.sbin/certctl/certctl.c +++ b/usr.sbin/certctl/certctl.c @@ -387,7 +387,12 @@ write_certs(const char *dir, struct cert_tree *tree) * Open and scan the directory. */ if ((d = open(dir, O_DIRECTORY | O_RDONLY)) < 0 || - (ndents = fdscandir(d, &dents, NULL, lexisort)) < 0) +#ifdef BOOTSTRAPPING + (ndents = scandir(dir, &dents, NULL, lexisort)) +#else + (ndents = fdscandir(d, &dents, NULL, lexisort)) +#endif + < 0) err(1, "%s", dir); /* * Iterate over the directory listing and the certificate listing
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202508132239.57DMdha8003412>