lib/icu: fix build without libc iconv support

Need to check for it in iconv.h. Otherwise meson prefixes a __builtin variant in the check.
This commit is contained in:
Rosen Penev 2020-07-20 19:59:20 -07:00 committed by Max Kellermann
parent 3c745b4bc6
commit c876d6a51c

View File

@ -18,7 +18,7 @@ if icu_dep.found()
'Init.cxx',
]
elif not get_option('iconv').disabled()
have_iconv = compiler.has_function('iconv')
have_iconv = compiler.has_function('iconv', prefix : '#include <iconv.h>')
conf.set('HAVE_ICONV', have_iconv)
if not have_iconv and get_option('iconv').enabled()
error('iconv() not available')