mirror of https://github.com/FFmpeg/FFmpeg.git
problems as with winsock (sockets != fd), and the broken select(). based on older patch by Andrew Bachmann. patch by (François Revol <revol at free dot fr>) Originally committed as revision 1144 to svn://svn.ffmpeg.org/ffmpeg/trunkpull/126/head
parent
bbd8335b69
commit
9ddd71fc60
10 changed files with 119 additions and 12 deletions
@ -0,0 +1,25 @@ |
||||
|
||||
#include <stdlib.h> |
||||
#include <strings.h> |
||||
#include "barpainet.h" |
||||
|
||||
int inet_aton (const char * str, struct in_addr * add) { |
||||
const char * pch = str; |
||||
unsigned int add1 = 0, add2 = 0, add3 = 0, add4 = 0; |
||||
|
||||
add1 = atoi(pch); |
||||
pch = strpbrk(pch,"."); |
||||
if (pch == 0 || ++pch == 0) goto done; |
||||
add2 = atoi(pch); |
||||
pch = strpbrk(pch,"."); |
||||
if (pch == 0 || ++pch == 0) goto done; |
||||
add3 = atoi(pch); |
||||
pch = strpbrk(pch,"."); |
||||
if (pch == 0 || ++pch == 0) goto done; |
||||
add4 = atoi(pch); |
||||
|
||||
done: |
||||
add->s_addr=(add4<<24)+(add3<<16)+(add2<<8)+add1; |
||||
|
||||
return 1;
|
||||
} |
@ -0,0 +1,23 @@ |
||||
#ifndef BARPA_INET_H |
||||
#define BARPA_INET_H |
||||
|
||||
#include "../config.h" |
||||
|
||||
#ifdef CONFIG_BEOS_NETSERVER |
||||
|
||||
# include <socket.h> |
||||
int inet_aton (const char * str, struct in_addr * add); |
||||
# define PF_INET AF_INET |
||||
# define SO_SNDBUF 0x40000001 |
||||
|
||||
/* fake */ |
||||
struct ip_mreq { |
||||
struct in_addr imr_multiaddr; /* IP multicast address of group */ |
||||
struct in_addr imr_interface; /* local IP address of interface */ |
||||
}; |
||||
|
||||
#else |
||||
# include <arpa/inet.h> |
||||
#endif |
||||
|
||||
#endif /* BARPA_INET_H */ |
Loading…
Reference in new issue