From f4cc52813c36cd68ea444f5b1c5b9e694b303b56 Mon Sep 17 00:00:00 2001 From: "Anthony J. Bentley" Date: Sun, 17 Jul 2016 03:59:30 -0600 Subject: [PATCH] Add required POSIX includes and fairly portable Unix include. POSIX specifies that inet_ntoa() is declared in arpa/inet.h, and that POLLRDNORM, etc. are defined in poll.h. gethostbyname() is not specified by POSIX, but the manpages in OpenBSD, FreeBSD, OS X, and glibc all state that it is declared in netdb.h. Without these headers, the build fails on OpenBSD and possibly other systems. --- Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_net.cpp | 5 +++++ Source/Core/Core/IPC_HLE/WII_Socket.cpp | 1 + 2 files changed, 6 insertions(+) diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_net.cpp b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_net.cpp index 4af2e469c1..e0f4b79da9 100644 --- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_net.cpp +++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_net.cpp @@ -6,6 +6,11 @@ #include #include #include +#ifndef _WIN32 +#include +#include +#include +#endif #include "Common/CommonPaths.h" #include "Common/FileUtil.h" diff --git a/Source/Core/Core/IPC_HLE/WII_Socket.cpp b/Source/Core/Core/IPC_HLE/WII_Socket.cpp index 1608316061..a7ee6fd4e8 100644 --- a/Source/Core/Core/IPC_HLE/WII_Socket.cpp +++ b/Source/Core/Core/IPC_HLE/WII_Socket.cpp @@ -4,6 +4,7 @@ #include #ifndef _WIN32 +#include #include #endif