From f88138d2bb666f3f6caebdb9ed5b1dda84af0f0f Mon Sep 17 00:00:00 2001 From: lotherk Date: Wed, 11 Nov 2026 08:41:28 +0000 Subject: [PATCH] mcde: McdeSys common.c builds on NetBSD: X/Open 700 for symlink(2) NetBSD declares symlink only for _XOPEN_SOURCE 500 and up or _NETBSD_SOURCE (src/include/unistd.h:249); with _POSIX_C_SOURCE alone the time zone code did not compile there ("implicit declaration of function 'symlink'", measured in the build VM). Measured in the build VM after the change: the zone in use (UTC: the VM has no /etc/localtime), 313 zones from Africa/Abidjan to UTC, a bad name refused; no Wi-Fi card there. Co-Authored-By: Claude Opus 5.5 --- lib/McdeSys/common.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/McdeSys/common.c b/lib/McdeSys/common.c index dec30063..20d1e6c9 100644 --- a/lib/McdeSys/common.c +++ b/lib/McdeSys/common.c @@ -10,6 +10,10 @@ */ #define _POSIX_C_SOURCE 200809L +/* symlink(2), for the time zone: NetBSD declares it only for X/Open 500 and + * up or _NETBSD_SOURCE (src/include/unistd.h:249); X/Open 700 is POSIX 2008 + * with it, on NetBSD and on glibc alike */ +#define _XOPEN_SOURCE 700 #include #include