diff options
author | Jo-Philipp Wich <jo@mein.io> | 2023-03-17 11:07:56 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2023-03-17 11:07:56 +0100 |
commit | 51f4dba6731333c92217503fac15ad03f86d675f (patch) | |
tree | d61cbcff42d87423379faa24dbb75b21586f155d | |
parent | 8f78aff2cb68fba43c0609f2470e8ae78381dcec (diff) |
ucode: also link libresolv if ns_initparse() is not found
Recent glibc versions require linking libresolv to obtain ns_initparse().
Fixes: #144
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3fb1f7a..d8dd34a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -171,8 +171,9 @@ IF(RESOLV_SUPPORT) SET_TARGET_PROPERTIES(resolv_lib PROPERTIES OUTPUT_NAME resolv PREFIX "") TARGET_LINK_OPTIONS(resolv_lib PRIVATE ${UCODE_MODULE_LINK_OPTIONS}) CHECK_FUNCTION_EXISTS(res_mkquery RES_MKQUERY_FUNCTION_EXISTS) + CHECK_FUNCTION_EXISTS(ns_initparse NS_INITARSE_FUNCTION_EXISTS) CHECK_FUNCTION_EXISTS(clock_gettime CLOCK_GETTIME_FUNCTION_EXISTS) - IF (NOT RES_MKQUERY_FUNCTION_EXISTS) + IF (NOT RES_MKQUERY_FUNCTION_EXISTS OR NOT NS_INITARSE_FUNCTION_EXISTS) TARGET_LINK_LIBRARIES(resolv_lib resolv) ENDIF() IF (NOT CLOCK_GETTIME_FUNCTION_EXISTS) |