diff options
author | Rick Yorgason <rick@firefang.com> | 2021-08-01 17:30:06 -0700 |
---|---|---|
committer | Rick Yorgason <rick@firefang.com> | 2021-08-01 17:30:06 -0700 |
commit | 3ee18ffc28be480b1c8bfb072f73a991734b3c25 (patch) | |
tree | b5f172d4babc1be9a2bcd1363d7e91bc80d2e1ec /meson.build | |
parent | d88dd1794e17c1ef9c63dd8c1adf54c7f7c89811 (diff) | |
download | cairo-3ee18ffc28be480b1c8bfb072f73a991734b3c25.tar.gz |
Added extra check for HAVE_STRNDUP in Win32 Mingw Meson build
Mingw on Windows defines the strndup function, but it's not actually usable because string.h doesn't exist. See details on the Meson bug here: https://github.com/mesonbuild/meson/issues/3672
Note that although Meson marked this bug as "fixed", it's only fixed in the case where you're using `prefix : '#include <string.h>'`.
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/meson.build b/meson.build index 5ddf7868b..f3ff3b4b8 100644 --- a/meson.build +++ b/meson.build @@ -115,7 +115,6 @@ check_funcs = [ 'funlockfile', 'getline', 'link', - 'strndup', 'fork', 'waitpid', 'raise', @@ -820,6 +819,8 @@ foreach name : check_funcs endif endforeach +conf.set('HAVE_STRNDUP', cc.has_function('strndup', prefix : '#include <string.h>')) + pthread_c_args = [] pthread_link_args = [] |