[vlc-commits] use proper check for the arpa/inet.h availability

Steve Lhomme git at videolan.org
Thu Apr 12 14:21:17 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Apr 12 13:56:27 2018 +0200| [999348ce52477bcb20c373690eb5b722cf541132] | committer: Steve Lhomme

use proper check for the arpa/inet.h availability

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=999348ce52477bcb20c373690eb5b722cf541132
---

 modules/access/decklink.cpp       | 2 ++
 modules/access/dsm/access.c       | 4 +++-
 modules/access/http/tunnel_test.c | 2 ++
 modules/codec/xwd.c               | 2 ++
 modules/video_output/decklink.cpp | 2 ++
 src/os2/getaddrinfo.c             | 2 ++
 6 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/modules/access/decklink.cpp b/modules/access/decklink.cpp
index b083a79f0f..eb5369eea2 100644
--- a/modules/access/decklink.cpp
+++ b/modules/access/decklink.cpp
@@ -30,7 +30,9 @@
 #include <vlc_plugin.h>
 #include <vlc_demux.h>
 
+#ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
+#endif
 
 #include <DeckLinkAPI.h>
 #include <DeckLinkAPIDispatch.cpp>
diff --git a/modules/access/dsm/access.c b/modules/access/dsm/access.c
index cf84161523..af3fda1645 100644
--- a/modules/access/dsm/access.c
+++ b/modules/access/dsm/access.c
@@ -41,9 +41,11 @@
 #ifdef HAVE_SYS_SOCKET_H
 # include <sys/socket.h>
 # include <netinet/in.h>
-# include <arpa/inet.h>
 # include <netdb.h>
 #endif
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
 
 #include <bdsm/bdsm.h>
 #include "../smb_common.h"
diff --git a/modules/access/http/tunnel_test.c b/modules/access/http/tunnel_test.c
index 90bc7efd01..d79329118e 100644
--- a/modules/access/http/tunnel_test.c
+++ b/modules/access/http/tunnel_test.c
@@ -39,7 +39,9 @@
 # define accept4(a,b,c,d) accept(a,b,c)
 #endif
 #include <netinet/in.h>
+#ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
+#endif
 
 #include <vlc_common.h>
 #include <vlc_tls.h>
diff --git a/modules/codec/xwd.c b/modules/codec/xwd.c
index 3e26b0be9f..571bca18e5 100644
--- a/modules/codec/xwd.c
+++ b/modules/codec/xwd.c
@@ -23,7 +23,9 @@
 #endif
 
 #include <assert.h>
+#ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
+#endif
 #include <X11/XWDFile.h>
 
 #include <vlc_common.h>
diff --git a/modules/video_output/decklink.cpp b/modules/video_output/decklink.cpp
index b2369297a6..40848cdb39 100644
--- a/modules/video_output/decklink.cpp
+++ b/modules/video_output/decklink.cpp
@@ -43,7 +43,9 @@
 #include <vlc_block.h>
 #include <vlc_image.h>
 #include <vlc_aout.h>
+#ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
+#endif
 
 #include <DeckLinkAPI.h>
 #include <DeckLinkAPIDispatch.cpp>
diff --git a/src/os2/getaddrinfo.c b/src/os2/getaddrinfo.c
index c7e74a15cd..a59c089761 100644
--- a/src/os2/getaddrinfo.c
+++ b/src/os2/getaddrinfo.c
@@ -30,7 +30,9 @@
 #include <vlc_common.h>
 #include <vlc_network.h>
 
+#ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
+#endif
 
 #define _NI_MASK (NI_NUMERICHOST|NI_NUMERICSERV|NI_NOFQDN|NI_NAMEREQD|\
                   NI_DGRAM)



More information about the vlc-commits mailing list