From: Michael Wallner Date: Thu, 3 Dec 2020 18:46:35 +0000 (+0100) Subject: p9y: bsd X-Git-Tag: 1.1.0-beta1~74 X-Git-Url: https://git.m6w6.name/?p=m6w6%2Flibmemcached;a=commitdiff_plain;h=b9748819d603f9d5c1dc54730ef38b6ee6d63ca4 p9y: bsd --- diff --git a/CMake/_Include.cmake b/CMake/_Include.cmake index a419d8df..79533f27 100644 --- a/CMake/_Include.cmake +++ b/CMake/_Include.cmake @@ -121,6 +121,7 @@ check_include(dlfcn.h) check_include(getopt.h) check_include(libgen.h) check_include(netdb.h) +check_include(netinet/in.h) check_include(poll.h) check_include(strings.h) check_include(sys/poll.h) diff --git a/src/libmemcached/behavior.cc b/src/libmemcached/behavior.cc index d0d6c6f2..acb0fe1a 100644 --- a/src/libmemcached/behavior.cc +++ b/src/libmemcached/behavior.cc @@ -17,7 +17,6 @@ #include "libmemcached/options.hpp" #include "libmemcached/virtual_bucket.h" #include "p9y/random.hpp" -#include "p9y/socket.hpp" #include #include diff --git a/src/libmemcached/common.h b/src/libmemcached/common.h index defb3b0d..c36384b2 100644 --- a/src/libmemcached/common.h +++ b/src/libmemcached/common.h @@ -38,24 +38,13 @@ # include #endif -#ifdef HAVE_SYS_UN_H -# include -#endif +#include "p9y/socket.hpp" #ifdef HAVE_SYS_TIME_H # include #endif #include -#include - -#ifdef HAVE_UNISTD_H -# include -#endif - -#ifdef HAVE_SYS_SOCKET_H -# include -#endif #ifdef HAVE_STRINGS_H # include diff --git a/src/libmemcached/connect.cc b/src/libmemcached/connect.cc index 913e48be..a4b9b40a 100644 --- a/src/libmemcached/connect.cc +++ b/src/libmemcached/connect.cc @@ -14,7 +14,6 @@ */ #include "libmemcached/common.h" -#include "p9y/socket.hpp" #include "p9y/poll.hpp" #include diff --git a/src/libmemcached/flush_buffers.cc b/src/libmemcached/flush_buffers.cc index 6c58e69c..512fa2b7 100644 --- a/src/libmemcached/flush_buffers.cc +++ b/src/libmemcached/flush_buffers.cc @@ -14,7 +14,6 @@ */ #include "libmemcached/common.h" -#include "p9y/socket.hpp" memcached_return_t memcached_flush_buffers(memcached_st *shell) { Memcached *memc = memcached2Memcached(shell); diff --git a/src/libmemcached/instance.cc b/src/libmemcached/instance.cc index 972f6b6f..266eccc7 100644 --- a/src/libmemcached/instance.cc +++ b/src/libmemcached/instance.cc @@ -14,7 +14,6 @@ */ #include "libmemcached/common.h" -#include "p9y/socket.hpp" static inline void _server_init(memcached_instance_st *self, Memcached *root, const memcached_string_t &hostname, in_port_t port, uint32_t weight, diff --git a/src/libmemcached/io.cc b/src/libmemcached/io.cc index 94aca617..0cf1931a 100644 --- a/src/libmemcached/io.cc +++ b/src/libmemcached/io.cc @@ -14,8 +14,6 @@ */ #include "libmemcached/common.h" - -#include "p9y/socket.hpp" #include "p9y/poll.hpp" void initialize_binary_request(memcached_instance_st *server, diff --git a/src/libmemcached/purge.cc b/src/libmemcached/purge.cc index d4b3146d..4437d761 100644 --- a/src/libmemcached/purge.cc +++ b/src/libmemcached/purge.cc @@ -14,7 +14,6 @@ */ #include "libmemcached/common.h" -#include "p9y/socket.hpp" #define memcached_set_purging(__object, __value) ((__object)->state.is_purging = (__value)) diff --git a/src/libmemcached/sasl.cc b/src/libmemcached/sasl.cc index 4fa981d2..437499b0 100644 --- a/src/libmemcached/sasl.cc +++ b/src/libmemcached/sasl.cc @@ -14,7 +14,6 @@ */ #include "libmemcached/common.h" -#include "p9y/socket.hpp" #include #include diff --git a/src/libmemcached/server.cc b/src/libmemcached/server.cc index 28d063ec..e038196a 100644 --- a/src/libmemcached/server.cc +++ b/src/libmemcached/server.cc @@ -14,7 +14,6 @@ */ #include "libmemcached/common.h" -#include "p9y/socket.hpp" static inline void _server_init(memcached_server_st *self, Memcached *root, const memcached_string_t &hostname, in_port_t port, uint32_t weight, diff --git a/src/libmemcachedprotocol/pedantic.c b/src/libmemcachedprotocol/pedantic.c index 9b7d728f..c966ee8b 100644 --- a/src/libmemcachedprotocol/pedantic.c +++ b/src/libmemcachedprotocol/pedantic.c @@ -14,8 +14,7 @@ */ #include "libmemcachedprotocol/common.h" - -#include +#include "p9y/socket.hpp" #define ensure(a) \ if (!(a)) { \ diff --git a/src/p9y/socket.hpp b/src/p9y/socket.hpp index 339b5995..ca0b97d3 100644 --- a/src/p9y/socket.hpp +++ b/src/p9y/socket.hpp @@ -16,6 +16,10 @@ # include #endif +#if defined HAVE_NETINET_IN_H +# include +#endif + #if defined HAVE_SYS_UN_H # include #endif diff --git a/test/lib/Connection.hpp b/test/lib/Connection.hpp index f087a697..bcb78e4a 100644 --- a/test/lib/Connection.hpp +++ b/test/lib/Connection.hpp @@ -18,6 +18,7 @@ #include "common.hpp" #include +#include #include class Connection {