]> git.sesse.net Git - vlc/blobdiff - plugins/network/ipv4.c
* IPv6 network module, courtesy of Alexis Guillard <alexis.guillard@bt.com>,
[vlc] / plugins / network / ipv4.c
index 293276f3d2da462bfec3dc2b8af0988a8d22d023..bae150a6d3451bc90b4ce8ab545143549faeae17 100644 (file)
@@ -2,9 +2,10 @@
  * ipv4.c: IPv4 network abstraction layer
  *****************************************************************************
  * Copyright (C) 2001, 2002 VideoLAN
- * $Id: ipv4.c,v 1.3 2002/03/02 03:53:55 xav Exp $
+ * $Id: ipv4.c,v 1.4 2002/03/04 23:56:37 massiot Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
+ *          Mathias Kretschmer <mathias@research.att.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -153,7 +154,9 @@ static int OpenUDP( network_socket_t * p_socket )
     int i_bind_port = p_socket->i_bind_port;
     char * psz_server_addr = p_socket->psz_server_addr;
     int i_server_port = p_socket->i_server_port;
-    char * psz_bind_win32;             /* WIN32 multicast kludge */
+#ifdef WIN32
+    char * psz_bind_win32;        /* WIN32 multicast kludge */
+#endif
 
     int i_handle, i_opt, i_opt_size;
     struct sockaddr_in sock;
@@ -226,12 +229,12 @@ static int OpenUDP( network_socket_t * p_socket )
 
     if (IN_MULTICAST( ntohl( inet_addr(psz_bind_addr) ) ) )
     {
-           psz_bind_win32 = NULL ;
+        psz_bind_win32 = NULL ;
     }
     if ( BuildAddr( &sock, psz_bind_win32, i_bind_port ) == -1 )
 #else
-    if ( BuildAddr( &sock, psz_bind_addr, i_bind_port ) == -1 )            
-#endif 
+    if ( BuildAddr( &sock, psz_bind_addr, i_bind_port ) == -1 )        
+#endif    
     {
         close( i_handle );
         return( -1 );
@@ -275,7 +278,7 @@ static int OpenUDP( network_socket_t * p_socket )
         struct ip_mreq imr;
         imr.imr_interface.s_addr = INADDR_ANY;
         imr.imr_multiaddr.s_addr = inet_addr(psz_bind_addr);
-#endif                     
+#endif                
         if( setsockopt( i_handle, IPPROTO_IP, IP_ADD_MEMBERSHIP,
                         (char*)&imr, sizeof(struct ip_mreq) ) == -1 )
         {