diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py index 43d7febf2..e490e7dee 100644 --- a/mesonbuild/dependencies/misc.py +++ b/mesonbuild/dependencies/misc.py @@ -451,8 +451,9 @@ class CursesSystemDependency(SystemDependency): class IconvBuiltinDependency(BuiltinDependency): def __init__(self, name: str, env: 'Environment', kwargs: T.Dict[str, T.Any]): super().__init__(name, env, kwargs) + code = '''#include \n\nint main() {\n iconv_open("","");\n}''' # [ignore encoding] this is C, not python, Mr. Lint - if self.clib_compiler.has_function('iconv_open', '#include ', env)[0]: + if self.clib_compiler.links(code, env)[0]: self.is_found = True