Fix build if --disable-netplay is used.

This commit is contained in:
Themaister 2012-08-08 07:40:00 +02:00
parent c48d8e45a9
commit e3a2bf1463

View File

@ -27,6 +27,11 @@
#include <stdio.h>
#include <string.h>
#ifndef _WIN32
#include <fcntl.h>
#include <unistd.h>
#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);
}