# define net_StopSend( fd ) (void)shutdown( fd, SD_SEND )
# define net_StopRecv( fd ) (void)shutdown( fd, SD_RECEIVE )
#else
-# warning FIXME: implement shutdown on your platform!
+# ifndef SYS_BEOS /* R5 just doesn't have a working shutdown() */
+# warning FIXME: implement shutdown on your platform!
+# endif
# define net_StopSend( fd ) (void)0
# define net_StopRecv( fd ) (void)0
#endif
&& ( ntohl( v4->sin_addr.s_addr ) <= 0xefffffff );
#endif
}
+#if defined( WIN32 ) || defined( HAVE_GETADDRINFO )
else if( res->ai_family == AF_INET6 )
{
-#if defined( WIN32 ) || defined( HAVE_GETADDRINFO )
struct sockaddr_in6 *v6 = (struct sockaddr_in6 *)res->ai_addr;
b_multicast = IN6_IS_ADDR_MULTICAST( &v6->sin6_addr );
-#endif
}
+#endif
vlc_freeaddrinfo( res );
return b_multicast;
{
char *end=NULL;
char *psz_item=NULL;
+ char *pos;
end = psz_string + strlen( psz_string );
}
/* read the author */
- char *pos;
/* parse the author until unescaped comma is reached */
psz_item = pos = psz_string;
while( psz_string < end && *psz_string != ',' )
if( ipv4 == INADDR_NONE )
return -1;
- memcpy( dst; &ipv4, 4 );
+ memcpy( dst, &ipv4, 4 );
# endif /* WIN32 */
return 0;
}
# include <ws2tcpip.h>
#else
# include <netdb.h>
-# include <arpa/inet.h>
+# ifdef HAVE_ARPA_INET_H
+# include <arpa/inet.h>
+# endif
#endif
#include "charset.h"
psz_head[2] = (i_hash & 0xFF00) >> 8; /* Msg id hash */
psz_head[3] = (i_hash & 0xFF); /* Msg id hash 2 */
- inet_pton( b_ipv6 ? AF_INET6 : AF_INET, /* can't fail */
- p_sap_session->p_address->psz_machine, psz_head + 4 );
+#if defined (HAVE_INET_PTON) || defined (WIN32)
+ if( b_ipv6 )
+ {
+ inet_pton( AF_INET6, /* can't fail */
+ p_sap_session->p_address->psz_machine,
+ psz_head + 4 );
+ }
+ else
+#else
+ {
+ inet_pton( AF_INET, /* can't fail */
+ p_sap_session->p_address->psz_machine,
+ psz_head + 4 );
+ }
+#endif
memcpy( psz_head + (b_ipv6 ? 20 : 8), "application/sdp", 15 );