From: Bruce Richardson Date: Fri, 27 Apr 2018 13:49:27 +0000 (+0100) Subject: build: fix check for libbsd in meson X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=9009d00746abbe17ce0a860e48d1dac9cb455199;p=dpdk.git build: fix check for libbsd in meson When we check for libbsd we were just checking for the library itself. However, on some distros, e.g. CentOS, libbsd will be found even though it's not usable by DPDK as it's missing the string header. Therefore we should check for both the library and the header file. Fixes: 5364de644a4b ("eal: support strlcpy function") Signed-off-by: Bruce Richarson Reported-by: Vladimir Medvedkin Acked-by: Vladimir Medvedkin Acked-by: Luca Boccassi --- diff --git a/config/meson.build b/config/meson.build index 5815b56021..2179c689c1 100644 --- a/config/meson.build +++ b/config/meson.build @@ -43,7 +43,8 @@ if numa_dep.found() and cc.has_header('numaif.h') endif # check for strlcpy -if host_machine.system() == 'linux' and cc.find_library('bsd', required: false).found() +if host_machine.system() == 'linux' and cc.find_library('bsd', + required: false).found() and cc.has_header('bsd/string.h') dpdk_conf.set('RTE_USE_LIBBSD', 1) add_project_link_arguments('-lbsd', language: 'c') dpdk_extra_ldflags += '-lbsd'