Commit 333ed248 authored by Steve Lhomme's avatar Steve Lhomme

use the proper check for sys/socket.h availability

parent 34bfcde5
......@@ -26,9 +26,9 @@
#include <errno.h>
#include <sys/types.h>
#ifndef _WIN32
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#else
#elif defined(_WIN32)
# include <winsock2.h>
# include <ws2tcpip.h>
# undef EAFNOSUPPORT
......
......@@ -88,7 +88,9 @@ ssize_t recvmsg(int fd, struct msghdr *msg, int flags)
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#include <sys/uio.h>
ssize_t recvmsg(int fd, struct msghdr *msg, int flags)
......
......@@ -78,7 +78,9 @@ ssize_t sendmsg(int fd, const struct msghdr *msg, int flags)
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#include <sys/uio.h>
ssize_t sendmsg(int fd, const struct msghdr *msg, int flags)
......
......@@ -370,9 +370,9 @@ void swab (const void *, void *, ssize_t);
/* Socket stuff */
#ifndef HAVE_INET_PTON
# ifndef _WIN32
# ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#else
# elif defined(_WIN32)
typedef int socklen_t;
# endif
int inet_pton(int, const char *, void *);
......
......@@ -21,9 +21,9 @@
#ifndef VLC_INTERRUPT_H
# define VLC_INTERRUPT_H 1
# include <vlc_threads.h>
# ifndef _WIN32
# ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h> /* socklen_t */
# else
# elif defined(_WIN32)
# include <ws2tcpip.h>
# endif
......
......@@ -50,7 +50,9 @@
# define IPV6_V6ONLY 27
# endif
#else
# include <sys/socket.h>
# ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
# endif
# include <netinet/in.h>
# include <netdb.h>
# define net_errno errno
......
......@@ -29,7 +29,9 @@
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#include <vlc_common.h>
#include <vlc_block.h>
......
......@@ -29,7 +29,9 @@
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#include <vlc_common.h>
#include <vlc_block.h>
......
......@@ -31,7 +31,9 @@
#include <sys/types.h>
#include <unistd.h>
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#ifndef SOCK_CLOEXEC
# define SOCK_CLOEXEC 0
# define accept4(a,b,c,d) accept(a,b,c)
......
......@@ -43,7 +43,7 @@
#ifdef _WIN32
# include <winsock2.h>
# include <ws2tcpip.h>
#else
#elif defined (HAVE_SYS_SOCKET_H)
# include <sys/socket.h>
#endif
......
......@@ -399,7 +399,9 @@ int vlc_poll_i11e(struct pollfd *fds, unsigned nfds, int timeout)
# include <fcntl.h>
# include <sys/uio.h>
# include <sys/socket.h>
# ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
# endif
/* There are currently no ways to atomically force a non-blocking read or write
......
......@@ -55,7 +55,7 @@
#if defined(_WIN32)
# include <winsock2.h>
#else
#elif defined(HAVE_SYS_SOCKET_H)
# include <sys/socket.h>
#endif
......
......@@ -41,7 +41,9 @@ int rootwrap_bind (int, int, int, const struct sockaddr *, size_t);
#include <sys/types.h>
#include <unistd.h>
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#include <sys/uio.h>
#include <sys/un.h>
#include <netinet/in.h>
......
......@@ -38,7 +38,9 @@
#include <fcntl.h>
#include <sys/stat.h>
#include <dirent.h>
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#include <signal.h>
#include <vlc_common.h>
......
......@@ -40,7 +40,9 @@
#include <time.h>
#include <sys/types.h>
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#include <sys/time.h>
#include <sys/select.h>
......
......@@ -38,7 +38,9 @@
#include <fcntl.h>
#include <sys/stat.h>
#include <dirent.h>
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#include <vlc_common.h>
#include <vlc_fs.h>
......
......@@ -29,7 +29,9 @@
#include <string.h>
#include <sys/types.h>
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#include <poll.h>
#include <vlc_common.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment