logo

utils

~/.local/bin tools and git-hooks git clone https://hacktivis.me/git/utils.git
commit: 7388639c77f0a4760932fcef994bf8aa7ff73aaf
parent b8db9446ae0c9104d5aa677b61b2cfa903c16e5f
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sat,  3 Jun 2023 06:49:15 +0200

cmd/touch: Fix for NetBSD

I really hate those #define guards of NetBSD…

Diffstat:

Mcmd/touch.c3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cmd/touch.c b/cmd/touch.c @@ -3,7 +3,8 @@ // SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only #define _DEFAULT_SOURCE // tm_gmtoff/tm_zone -#define _XOPEN_SOURCE 700 // strptime, tm_atim/tm_mtim +#define _XOPEN_SOURCE 700 // strptime (NetBSD) +#define _POSIX_C_SOURCE 200809L // O_NOFOLLOW, st_atim/st_mtim #include <errno.h> /* errno */ #include <fcntl.h> /* open */