From 4f80afe03ec56b4428364b66e839d23e7b95d7cb Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 29 Aug 2015 16:02:10 +0200 Subject: [PATCH] Move code to net_compat.h --- libretro-common/include/net/net_compat.h | 13 +++++++++++++ logger/netlogger/logger.c | 13 ------------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/libretro-common/include/net/net_compat.h b/libretro-common/include/net/net_compat.h index 8a3236782e..4b6044cf7d 100644 --- a/libretro-common/include/net/net_compat.h +++ b/libretro-common/include/net/net_compat.h @@ -83,6 +83,19 @@ #include +#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) diff --git a/logger/netlogger/logger.c b/logger/netlogger/logger.c index e6e8c037ce..3a14638def 100644 --- a/logger/netlogger/logger.c +++ b/logger/netlogger/logger.c @@ -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;