diff options
author | Joshua Watt <jpewhacker@gmail.com> | 2020-02-20 16:49:31 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-02-21 09:39:01 +0000 |
commit | adf9825d1c12fcce1249c3c4c37347ac713ff7ac (patch) | |
tree | bf0ea029ebc51103c74e6867da52926f849d7508 /meta/recipes-graphics/wayland/wayland | |
parent | 8ee7ad352ecaffaf3e35477546c059ee05ebfaa8 (diff) | |
download | poky-adf9825d1c12fcce1249c3c4c37347ac713ff7ac.tar.gz |
wayland: Fix strndup detection on MinGW
Applies a patch to fix strndup being detected as present incorrectly
when building for MinGW.
(From OE-Core rev: ffa91ff19f73c3ed4060a6ecd3b6da7f46732cb3)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/wayland/wayland')
-rw-r--r-- | meta/recipes-graphics/wayland/wayland/0001-build-Fix-strndup-detection-on-MinGW.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/meta/recipes-graphics/wayland/wayland/0001-build-Fix-strndup-detection-on-MinGW.patch b/meta/recipes-graphics/wayland/wayland/0001-build-Fix-strndup-detection-on-MinGW.patch new file mode 100644 index 0000000000..e445838750 --- /dev/null +++ b/meta/recipes-graphics/wayland/wayland/0001-build-Fix-strndup-detection-on-MinGW.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From e6783c99f051c6d8252db5f388d805cef0e16357 Mon Sep 17 00:00:00 2001 | ||
2 | From: Joshua Watt <JPEWhacker@gmail.com> | ||
3 | Date: Thu, 20 Feb 2020 15:20:45 -0600 | ||
4 | Subject: [PATCH] build: Fix strndup detection on MinGW | ||
5 | |||
6 | GCC and meson conspire together to incorrectly detect that strndup() | ||
7 | exists on MinGW as __builtin_strndup, when no such function exists. As a | ||
8 | work around, meson will skip looking for __builtin functions if an | ||
9 | '#include' is in the prefix, so add '#include <string.h>' when looking | ||
10 | for strndup(). | ||
11 | |||
12 | See: https://github.com/mesonbuild/meson/issues/3672 | ||
13 | |||
14 | Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> | ||
15 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/wayland/merge_requests/63] | ||
16 | --- | ||
17 | meson.build | 2 +- | ||
18 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/meson.build b/meson.build | ||
21 | index 26b084f..c05d019 100644 | ||
22 | --- a/meson.build | ||
23 | +++ b/meson.build | ||
24 | @@ -36,11 +36,11 @@ have_funcs = [ | ||
25 | 'posix_fallocate', | ||
26 | 'prctl', | ||
27 | 'memfd_create', | ||
28 | - 'strndup', | ||
29 | ] | ||
30 | foreach f: have_funcs | ||
31 | config_h.set('HAVE_' + f.underscorify().to_upper(), cc.has_function(f)) | ||
32 | endforeach | ||
33 | +config_h.set('HAVE_STRNDUP', cc.has_function('strndup', prefix:'#include <string.h>')) | ||
34 | |||
35 | if get_option('libraries') | ||
36 | ffi_dep = dependency('libffi') | ||
37 | -- | ||
38 | 2.17.1 | ||
39 | |||