meson: unbreak dl check on BSDs without libdl

Regression from 1835dfc05c. The actual
libdl dependency is not always required for the function symbol check.
Fixes #10901.
This commit is contained in:
Dudemanguy 2022-11-20 12:04:04 -06:00
parent f10b24e3c5
commit 04f765da6f
1 changed files with 1 additions and 1 deletions

View File

@ -327,7 +327,7 @@ endif
features += {'ta-leak-report': get_option('ta-leak-report')}
libdl_dep = cc.find_library('dl', required: false)
features += {'libdl': libdl_dep.found() and cc.has_function('dlopen', dependencies: libdl_dep, prefix: '#include <dlfcn.h>')}
features += {'libdl': cc.has_function('dlopen', dependencies: libdl_dep, prefix: '#include <dlfcn.h>')}
if features['libdl']
dependencies += libdl_dep
endif