From 46b90adf3d2fd039007362865d8d32405e1d8500 Mon Sep 17 00:00:00 2001 From: Leonardo Di Donato Date: Wed, 9 Sep 2020 11:03:33 +0000 Subject: [PATCH] fix(userspace/libsinsp): missing ifndef for minimal build in addrinfo Co-authored-by: Leonardo Grasso Signed-off-by: Leonardo Di Donato --- userspace/libsinsp/CMakeLists.txt | 2 +- userspace/libsinsp/addrinfo.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/userspace/libsinsp/CMakeLists.txt b/userspace/libsinsp/CMakeLists.txt index 6113e3a0f2..f847c5a94c 100644 --- a/userspace/libsinsp/CMakeLists.txt +++ b/userspace/libsinsp/CMakeLists.txt @@ -22,7 +22,6 @@ include_directories(../async) include_directories(./include) include_directories("${JSONCPP_INCLUDE}") include_directories("${LUAJIT_INCLUDE}") -include_directories("${CARES_INCLUDE}") if(NOT WIN32 AND NOT APPLE) include_directories("${B64_INCLUDE}") @@ -32,6 +31,7 @@ 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 c46351e97f..dc8ec7d75e 100644 --- a/userspace/libsinsp/addrinfo.cpp +++ b/userspace/libsinsp/addrinfo.cpp @@ -15,7 +15,7 @@ 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,3 +38,4 @@ void ares_cb(void *arg, int status, int timeouts, struct hostent *host) res->done = true; } } +#endif // MINIMAL_BUILD \ No newline at end of file