diff options
author | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-08-29 20:05:08 +0000 |
---|---|---|
committer | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-08-29 20:05:08 +0000 |
commit | 3af860b877587ab276388956e797a7ad04cd41e3 (patch) | |
tree | 72ec51bfb57ae90faf65e7e87aedc870bef31ca8 /stream/udp.c | |
parent | 6c30638aa150adad54c0961e70af25f8014a9ba9 (diff) | |
download | mpv-3af860b877587ab276388956e797a7ad04cd41e3.tar.bz2 mpv-3af860b877587ab276388956e797a7ad04cd41e3.tar.xz |
Rename HAVE_WINSOCK preprocessor condition to HAVE_WINSOCK_H.
This is what it is called in FFmpeg and more consistent with other
names for similar conditionals. This fixes a potential compilation
failure on MinGW, as described in Bugzilla #1262.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27493 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream/udp.c')
-rw-r--r-- | stream/udp.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/stream/udp.c b/stream/udp.c index 759c5a9675..52d47a0991 100644 --- a/stream/udp.c +++ b/stream/udp.c @@ -31,7 +31,7 @@ #include <sys/time.h> #include <ctype.h> -#ifndef HAVE_WINSOCK2 +#ifndef HAVE_WINSOCK2_H #include <netdb.h> #include <netinet/in.h> #include <sys/socket.h> @@ -74,7 +74,7 @@ udp_open_socket (URL_t *url) if (isalpha (url->hostname[0])) { -#ifndef HAVE_WINSOCK2 +#ifndef HAVE_WINSOCK2_H hp = (struct hostent *) gethostbyname (url->hostname); if (!hp) { @@ -87,11 +87,11 @@ udp_open_socket (URL_t *url) (void *) hp->h_addr_list[0], hp->h_length); #else server_address.sin_addr.s_addr = htonl (INADDR_ANY); -#endif /* HAVE_WINSOCK2 */ +#endif /* HAVE_WINSOCK2_H */ } else { -#ifndef HAVE_WINSOCK2 +#ifndef HAVE_WINSOCK2_H #ifdef HAVE_ATON inet_aton (url->hostname, &server_address.sin_addr); #else @@ -99,7 +99,7 @@ udp_open_socket (URL_t *url) #endif /* HAVE_ATON */ #else server_address.sin_addr.s_addr = htonl(INADDR_ANY); -#endif /* HAVE_WINSOCK2 */ +#endif /* HAVE_WINSOCK2_H */ } server_address.sin_family = AF_INET; server_address.sin_port = htons (url->port); @@ -110,11 +110,11 @@ udp_open_socket (URL_t *url) if (bind (socket_server_fd, (struct sockaddr *) &server_address, sizeof (server_address)) == -1) { -#ifndef HAVE_WINSOCK2 +#ifndef HAVE_WINSOCK2_H if (errno != EINPROGRESS) #else if (WSAGetLastError () != WSAEINPROGRESS) -#endif /* HAVE_WINSOCK2 */ +#endif /* HAVE_WINSOCK2_H */ { mp_msg (MSGT_NETWORK, MSGL_ERR, "Failed to connect to server\n"); closesocket (socket_server_fd); @@ -122,7 +122,7 @@ udp_open_socket (URL_t *url) } } -#ifdef HAVE_WINSOCK2 +#ifdef HAVE_WINSOCK2_H if (isalpha (url->hostname[0])) { hp = (struct hostent *) gethostbyname (url->hostname); @@ -141,7 +141,7 @@ udp_open_socket (URL_t *url) unsigned int addr = inet_addr (url->hostname); memcpy ((void *) &server_address.sin_addr, (void *) &addr, sizeof (addr)); } -#endif /* HAVE_WINSOCK2 */ +#endif /* HAVE_WINSOCK2_H */ /* Increase the socket rx buffer size to maximum -- this is UDP */ rxsockbufsz = 240 * 1024; |