Skip to contentSkip to conversation

wayland: fix condition for strndup detection

PATCH New Khem Raj 1 participant 1 message May 12, 2020

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 wayland: fix condition for strndup detection

current check does not work with gcc10

---
 .../0001-build-Fix-strndup-detection-on-MinGW.patch        | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
meta/recipes-graphics/wayland/wayland/0001-build-Fix-strndup-detection-on-MinGW.patch +1 -6
index e445838750..c2ceae4a47 100644
@@ -17,8 +17,6 @@ Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/wayland/merge
  meson.build | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/meson.build b/meson.build
-index 26b084f..c05d019 100644
 --- a/meson.build
 +++ b/meson.build
 @@ -36,11 +36,11 @@ have_funcs = [
@@ -30,10 +28,7 @@ index 26b084f..c05d019 100644
  foreach f: have_funcs
  	config_h.set('HAVE_' + f.underscorify().to_upper(), cc.has_function(f))
  endforeach
-+config_h.set('HAVE_STRNDUP', cc.has_function('strndup', prefix:'#include <string.h>'))
++config_h.set('HAVE_STRNDUP', cc.has_function('strndup') and cc.has_header_symbol('string.h', 'strndup'))
  
  if get_option('libraries')
  	ffi_dep = dependency('libffi')
--- 
-2.17.1
-
Signature · 1 line
2.26.2