From e3a2bf146357cd36802f79bb82b3604819a1cff8 Mon Sep 17 00:00:00 2001 From: Themaister Date: Wed, 8 Aug 2012 07:40:00 +0200 Subject: [PATCH] Fix build if --disable-netplay is used. --- command.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/command.c b/command.c index b34e6ceaeb..47d032125f 100644 --- a/command.c +++ b/command.c @@ -27,6 +27,11 @@ #include #include +#ifndef _WIN32 +#include +#include +#endif + #define DEFAULT_NETWORK_CMD_PORT 55355 #define STDIN_BUF_SIZE 4096 @@ -114,7 +119,9 @@ rarch_cmd_t *rarch_cmd_new(bool stdin_enable, bool network_enable, uint16_t port (void)stdin_enable; #endif +#ifdef HAVE_NETWORK_CMD freeaddrinfo(res); +#endif return handle; error: @@ -128,8 +135,10 @@ error: void rarch_cmd_free(rarch_cmd_t *handle) { +#ifdef HAVE_NETWORK_CMD if (handle->net_fd >= 0) close(handle->net_fd); +#endif free(handle); }