From cb6ccf2632c3b09237b2bfe04687fa5d8b4c88ab Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Fri, 18 Sep 2020 10:36:37 -0700 Subject: [PATCH] dependencies/zlib: Fix header detection has_header returns a tuple of (found: bool, cached: bool), so `if has_header` will always return true because the tuple is non-empty. We need to check if the found value is true or not. --- mesonbuild/dependencies/dev.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesonbuild/dependencies/dev.py b/mesonbuild/dependencies/dev.py index 67d7e65fa..99c5c07f0 100644 --- a/mesonbuild/dependencies/dev.py +++ b/mesonbuild/dependencies/dev.py @@ -480,7 +480,7 @@ class ZlibSystemDependency(ExternalDependency): for lib in libs: l = self.clib_compiler.find_library(lib, environment, []) h = self.clib_compiler.has_header('zlib.h', '', environment, dependencies=[self]) - if l and h: + if l and h[0]: self.is_found = True self.link_args = l break