logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git
commit: 3a80ade19d893a1d8afa04c6394a74261e871c92
parent 08d548c30670bc1708e9620d7d8b43506646f27c
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Fri, 20 Sep 2024 06:28:46 +0200

cmd/nproc: BSD_VISIBILITY shenanigans with _POSIX_C_SOURCE

Diffstat:

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

diff --git a/cmd/nproc.c b/cmd/nproc.c @@ -5,7 +5,8 @@ // _SC_NPROCESSORS_CONF &_SC_NPROCESSORS_ONLN got added in POSIX.1-2024 // https://www.austingroupbugs.net/view.php?id=339 #define _DEFAULT_SOURCE -#define _POSIX_C_SOURCE 202405L +// Sadly {Free,Net}BSD hides _SC_NPROCESSORS_{CONF,ONLN} if _POSIX_C_SOURCE is defined *sigh* +// #define _POSIX_C_SOURCE 202405L #include <errno.h> #include <stdio.h> // printf #include <string.h> // strerror