diff options
| author | Thomas Voss <mail@thomasvoss.com> | 2024-01-20 19:32:48 +0100 | 
|---|---|---|
| committer | Thomas Voss <mail@thomasvoss.com> | 2024-01-20 19:32:48 +0100 | 
| commit | 99941fbee8af208a48db6d84616f1696e0852527 (patch) | |
| tree | d9cdffacef05b3bf713e0bd88e937d1a604be9a6 | |
| parent | 3587466302bb41cc0599356d88d998ba70d494db (diff) | |
Define _POSIX_C_SOURCE on Glibc
You sometimes need this for getsubopt()
| -rw-r--r-- | make.c | 11 | 
1 files changed, 11 insertions, 0 deletions
| @@ -6,6 +6,14 @@  #include <string.h>  #include <unistd.h> +#if defined(__has_include) && __has_include(<features.h>) +#	include <features.h> +#endif + +#ifdef __GLIBC__ +#	define _POSIX_C_SOURCE 200809L +#endif +  #include "cbs.h"  #include "src/compat.h" @@ -93,6 +101,9 @@ main(int argc, char **argv)  			buf[sizeof(buf) - 2] = i + '0';  			cmdaddv(&c, sv.buf, sv.len); +#ifdef __GLIBC__ +			cmdadd(&c, "-D_POSIX_C_SOURCE=200809L"); +#endif  			cmdadd(&c, buf);  			if (!Pflag) {  				struct strv pc = {0}; |