From: Andreas Schneider Date: Thu, 23 Oct 2014 10:41:52 +0000 (+0200) Subject: cmake: Fix tests on Solaris. X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=e12490601efef47cae766fb437c8f070a5acc19f;p=obnox%2Fcwrap%2Fresolv_wrapper.git cmake: Fix tests on Solaris. Signed-off-by: Andreas Schneider Reviewed-by: Michael Adam --- diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index acd675f..fb8876c 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -33,7 +33,10 @@ set(PRELOAD_LIBS ${RESOLV_WRAPPER_LOCATION}) # Some tests require socket_wrapper as well. find_package(socket_wrapper) -if (HAVE_LIBRESOLV AND SOCKET_WRAPPER_LIBRARY) + +# On Solaris the socket functions are compiled into libresolv.so so we can't preload +# socket_wrapper. Only faking will work! +if (HAVE_LIBRESOLV AND SOCKET_WRAPPER_LIBRARY AND NOT SOLARIS) set(RWRAP_TESTS ${RWRAP_TESTS} test_res_query_search) set(PRELOAD_LIBS ${RESOLV_WRAPPER_LOCATION}:${SOCKET_WRAPPER_LIBRARY}) endif()