mirror of
https://github.com/libretro/RetroArch
synced 2025-02-06 09:40:06 +00:00
Fix build if --disable-netplay is used.
This commit is contained in:
parent
c48d8e45a9
commit
e3a2bf1463
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user