From 73554b9c48b06612eb50494ee6fa5b779c57edc0 Mon Sep 17 00:00:00 2001 From: Lorenzo Fontana Date: Wed, 9 Sep 2020 14:40:42 +0200 Subject: [PATCH] build: minimal build checks for c-ares Co-Authored-By: Leonardo Di Donato Co-Authored-By: Leonardo Grasso Signed-off-by: Lorenzo Fontana --- userspace/libsinsp/CMakeLists.txt | 5 ++++- userspace/libsinsp/addrinfo.cpp | 2 -- userspace/libsinsp/addrinfo.h | 3 +-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/userspace/libsinsp/CMakeLists.txt b/userspace/libsinsp/CMakeLists.txt index f847c5a94c..d72f9115f2 100644 --- a/userspace/libsinsp/CMakeLists.txt +++ b/userspace/libsinsp/CMakeLists.txt @@ -23,6 +23,10 @@ include_directories(./include) include_directories("${JSONCPP_INCLUDE}") include_directories("${LUAJIT_INCLUDE}") +if(NOT MINIMAL_BUILD) + include_directories("${CARES_INCLUDE}") +endif() + if(NOT WIN32 AND NOT APPLE) include_directories("${B64_INCLUDE}") include_directories("${CURSES_INCLUDE_DIR}") @@ -31,7 +35,6 @@ if(NOT WIN32 AND NOT APPLE) include_directories("${PROTOBUF_INCLUDE}") include_directories("${OPENSSL_INCLUDE_DIR}") include_directories("${CURL_INCLUDE_DIR}") - include_directories("${CARES_INCLUDE}") endif() # NOT MINIMAL_BUILD include_directories("${JQ_INCLUDE}") include_directories("${CMAKE_CURRENT_BINARY_DIR}") diff --git a/userspace/libsinsp/addrinfo.cpp b/userspace/libsinsp/addrinfo.cpp index dc8ec7d75e..5146dfdf5a 100644 --- a/userspace/libsinsp/addrinfo.cpp +++ b/userspace/libsinsp/addrinfo.cpp @@ -15,7 +15,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -#ifndef MINIMAL_BUILD #include "addrinfo.h" #include @@ -38,4 +37,3 @@ void ares_cb(void *arg, int status, int timeouts, struct hostent *host) res->done = true; } } -#endif // MINIMAL_BUILD \ No newline at end of file diff --git a/userspace/libsinsp/addrinfo.h b/userspace/libsinsp/addrinfo.h index 028ebb816f..31e25df849 100644 --- a/userspace/libsinsp/addrinfo.h +++ b/userspace/libsinsp/addrinfo.h @@ -1,4 +1,3 @@ - /* Copyright (C) 2020 Sysdig Inc. @@ -33,4 +32,4 @@ struct ares_cb_result void ares_cb(void *arg, int status, int timeouts, struct hostent *host); -#endif // MINIMAL_BUILD \ No newline at end of file +#endif // MINIMAL_BUILD