diff options
| -rw-r--r-- | meson.build | 3 | ||||
| -rw-r--r-- | src/util/u_string.h | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/meson.build b/meson.build index 08f24f53933..5d6ee648f24 100644 --- a/meson.build +++ b/meson.build @@ -1090,6 +1090,9 @@ elif host_machine.system() == 'windows' '-D_UCRT_NOISY_NAN', # https://developercommunity.visualstudio.com/t/NAN-is-no-longer-compile-time-constant-i/10688907?viewtype=all ] else + # MINGW also accept _GNU_SOURCE + pre_args += '-D_GNU_SOURCE' + # When the target is not (mingw with ucrt) # NOTE: clang's stddef.h are conflict with mingw or ucrt's stddef.h # So do not include headers that defined in clang for detecting diff --git a/src/util/u_string.h b/src/util/u_string.h index 73d5c3be3e4..093101af8a0 100644 --- a/src/util/u_string.h +++ b/src/util/u_string.h @@ -50,7 +50,7 @@ extern "C" { #endif -#if !defined(_GNU_SOURCE) || defined(__APPLE__) +#if !defined(_GNU_SOURCE) || defined(__APPLE__) || defined(DETECT_OS_WINDOWS) #define strchrnul util_strchrnul static inline char * |