logo

utils-std

Collection of commonly available Unix tools
commit: b4f92de9131cdd1a60f288fc373d4b1517b27161
parent 71398d833600220c6477b4af250b98f23abec755
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sat, 23 Mar 2024 04:36:59 +0100

cmd/rm: NetBSD <10 and fdopendir strikes again

Diffstat:

Mcmd/rm.c6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/cmd/rm.c b/cmd/rm.c @@ -3,6 +3,12 @@ // SPDX-License-Identifier: MPL-2.0 #define _POSIX_C_SOURCE 200809L + +// NetBSD <10 hides fdopendir behind _NETBSD_SOURCE +#if __NetBSD_Version__ < 1000000000 +#define _NETBSD_SOURCE +#endif + #include <ctype.h> // isprint #include <dirent.h> // fdopendir, readdir, closedir #include <errno.h> // errno