From: Michael Wallner Date: Mon, 13 Sep 2021 12:20:55 +0000 (+0200) Subject: test(timeout): include guards X-Git-Tag: 1.1.1~5 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=f1e7d4abf5d5a74eb5f618705b3e85b1c4f86386;p=awesomized%2Flibmemcached test(timeout): include guards --- diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 523db5be..b9ce01ae 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -46,6 +46,7 @@ if(NOT MEMCACHED_BINARY) endif() add_executable(timeout timeout.c) +target_include_directories(timeout PRIVATE ${CMAKE_BINARY_DIR}) file(GLOB_RECURSE TESTING_SRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp) set(TESTING_ROOT "${CMAKE_CURRENT_BINARY_DIR}") diff --git a/test/timeout.c b/test/timeout.c index e3c59a3a..000aa12e 100644 --- a/test/timeout.c +++ b/test/timeout.c @@ -1,9 +1,17 @@ +#include "mem_config.h" #include #include #include #include -#include -#include +#if HAVE_ARPA_INET_H +# include +#endif +#if HAVE_SYS_SOCKET_H +# include +#endif +#if HAVE_NETINET_IN_H +# include +#endif // $0 -u nobody -p int main(int argc, char **argv) {