From 4d0875e07adee83952ffcd15add00b0c71c29180 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Mon, 21 Dec 2020 09:35:11 +0100 Subject: [PATCH] p9y: fix includes --- contrib/bin/memaslap/ms_setting.h | 4 ++++ src/p9y/poll.hpp | 6 +++--- test/lib/Connection.cpp | 2 +- test/lib/ForkAndExec.cpp | 3 +-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/contrib/bin/memaslap/ms_setting.h b/contrib/bin/memaslap/ms_setting.h index 51cab2f7..dc0a108a 100644 --- a/contrib/bin/memaslap/ms_setting.h +++ b/contrib/bin/memaslap/ms_setting.h @@ -18,6 +18,10 @@ #include "ms_memslap.h" +#ifdef HAVE_SYS_TIME_H +# include +#endif + #ifdef __cplusplus extern "C" { #endif diff --git a/src/p9y/poll.hpp b/src/p9y/poll.hpp index 57fee463..bff0f1b7 100644 --- a/src/p9y/poll.hpp +++ b/src/p9y/poll.hpp @@ -2,10 +2,10 @@ #include "libmemcached-1/platform.h" -#if defined HAVE_SYS_POLL_H -# include -#elif defined HAVE_POLL_H +#if defined HAVE_POLL_H # include +#elif defined HAVE_SYS_POLL_H +# include #elif defined _WIN32 # define poll WSAPoll typedef int nfds_t; diff --git a/test/lib/Connection.cpp b/test/lib/Connection.cpp index 806ce502..82414f13 100644 --- a/test/lib/Connection.cpp +++ b/test/lib/Connection.cpp @@ -1,7 +1,7 @@ #include "Connection.hpp" +#include "p9y/poll.hpp" #include -#include #if HAVE_UNISTD_H # include #endif diff --git a/test/lib/ForkAndExec.cpp b/test/lib/ForkAndExec.cpp index 753e06ee..be994fc6 100644 --- a/test/lib/ForkAndExec.cpp +++ b/test/lib/ForkAndExec.cpp @@ -1,9 +1,8 @@ #include "ForkAndExec.hpp" +#include "p9y/poll.hpp" #include - #include -#include #if HAVE_UNISTD_H # include #endif -- 2.30.2