commit: 2356160ae715d3ba75b0f7eb4efdd4e7f150000f
parent c8db7df93df9b7c25c3d165e49870348bea0f836
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Thu, 14 Mar 2024 05:34:12 +0100
cmd/chmod: fdopendir(3) under NetBSD <10 workaround
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/cmd/chmod.c b/cmd/chmod.c
@@ -4,6 +4,11 @@
#define _POSIX_C_SOURCE 200809L
+// NetBSD <10 hides fdopendir behind _NETBSD_SOURCE
+#if __NetBSD_Version__ < 1000000000
+#define _NETBSD_SOURCE
+#endif
+
#include "../lib/mode.h"
#include <dirent.h> // fdopendir, readdir, closedir