Move code to net_compat.h

This commit is contained in:
twinaphex 2015-08-29 16:02:10 +02:00
parent 5b67aaaa17
commit 4f80afe03e
2 changed files with 13 additions and 13 deletions

View File

@ -83,6 +83,19 @@
#include <errno.h>
#ifdef GEKKO
#define sendto(s, msg, len, flags, addr, tolen) net_sendto(s, msg, len, 0, addr, 8)
#define socket(domain, type, protocol) net_socket(domain, type, protocol)
static INLINE int inet_pton(int af, const char *src, void *dst)
{
if (af != AF_INET)
return -1;
return inet_aton (src, dst);
}
#endif
static INLINE bool isagain(int bytes)
{
#if defined(_WIN32)

View File

@ -41,19 +41,6 @@ static int sock;
static struct sockaddr_in target;
static char sendbuf[4096];
#ifdef GEKKO
#define sendto(s, msg, len, flags, addr, tolen) net_sendto(s, msg, len, 0, addr, 8)
#define socket(domain, type, protocol) net_socket(domain, type, protocol)
static int inet_pton(int af, const char *src, void *dst)
{
if (af != AF_INET)
return -1;
return inet_aton (src, dst);
}
#endif
static int if_up_with(int index)
{
(void)index;