commit: 07241cdabd8845ad4ea331842672cbc1b7863743
parent 06700995d374e2d60b6264dd2a99597f5b52b54d
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Sat, 4 May 2024 19:26:20 +0200
cmd/timeout: glibc fix
Diffstat:
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/cmd/timeout.c b/cmd/timeout.c
@@ -3,6 +3,7 @@
// SPDX-License-Identifier: MPL-2.0
#define _POSIX_C_SOURCE 200809L
+#define _DEFAULT_SOURCE // For NSIG in sys_signame.h, thanks glibc
#include "../lib/strtodur.h"
#include "../lib/sys_signame.h"
diff --git a/lib/sys_signame.h b/lib/sys_signame.h
@@ -1,8 +1,9 @@
// utils-std: Collection of commonly available Unix tools
// SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
// SPDX-License-Identifier: CC0-1.0 OR WTFPL
-#define _BSD_SOURCE // NSIG
-#define _GNU_SOURCE // NSIG
+#ifndef _DEFAULT_SOURCE
+#define _DEFAULT_SOURCE // NSIG
+#endif
#include <signal.h> // NSIG
static char *util_sys_signame[NSIG];