Just like in the previous commit, socket is offering its functions to the rest of the code and therefore it should not include libvirt-php.h. Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> --- src/libvirt-php.h | 5 ----- src/sockets.c | 17 ++++++++++++++++- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/libvirt-php.h b/src/libvirt-php.h index 6b34581..9978e27 100644 --- a/src/libvirt-php.h +++ b/src/libvirt-php.h @@ -84,11 +84,6 @@ #include <stdint.h> #include <libgen.h> -#ifdef __APPLE__ -#include <netinet/tcp.h> -#else -#include <linux/tcp.h> -#endif #else #define PRIx32 "I32x" diff --git a/src/sockets.c b/src/sockets.c index a175450..6620e17 100644 --- a/src/sockets.c +++ b/src/sockets.c @@ -7,8 +7,23 @@ * Michal Novotny <minovotn@xxxxxxxxxx> */ +#include <config.h> + +#include <errno.h> +#include <fcntl.h> +#include <netdb.h> +#include <string.h> +#include <sys/socket.h> +#include <sys/stat.h> +#include <sys/types.h> +#include <unistd.h> +#ifdef __APPLE__ +#include <netinet/tcp.h> +#else +#include <linux/tcp.h> +#endif + #include "sockets.h" -#include "libvirt-php.h" #include "util.h" #ifdef DEBUG_SOCKETS -- 2.8.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list