Commit e7440c3b authored by Eric Petit's avatar Eric Petit

ALL: compile fixes

parent 5599aa05
......@@ -399,7 +399,9 @@ int inet_pton(int af, const char *src, void *dst);
# 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
......@@ -515,13 +517,13 @@ static inline vlc_bool_t net_AddressIsMulticast( vlc_object_t *p_object, const c
&& ( 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;
......
......@@ -271,6 +271,7 @@ static void parseEXTINF(char *psz_string, char **ppsz_author,
{
char *end=NULL;
char *psz_item=NULL;
char *pos;
end = psz_string + strlen( psz_string );
......@@ -299,7 +300,6 @@ static void parseEXTINF(char *psz_string, char **ppsz_author,
}
/* read the author */
char *pos;
/* parse the author until unescaped comma is reached */
psz_item = pos = psz_string;
while( psz_string < end && *psz_string != ',' )
......
......@@ -1248,7 +1248,7 @@ int inet_pton(int af, const char *src, void *dst)
if( ipv4 == INADDR_NONE )
return -1;
memcpy( dst; &ipv4, 4 );
memcpy( dst, &ipv4, 4 );
# endif /* WIN32 */
return 0;
}
......
......@@ -42,7 +42,9 @@
# 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"
......@@ -447,8 +449,21 @@ static int announce_SAPAnnounceAdd( sap_handler_t *p_sap,
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 );
......
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