[libvirt-php][PATCH 10/11] sockets: Drop include of libvirt-php.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]