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;