Add NXDK (Xbox) support
CMake / CMake ubuntu-latest Debug (push) Cancelled after 0s
CMake / CMake windows-latest Debug (push) Cancelled after 0s
CMake / CMake macos-latest Release (push) Cancelled after 0s
CMake / CMake ubuntu-latest Release (push) Cancelled after 0s
CMake / CMake windows-latest Release (push) Cancelled after 0s
CMake / CMake macos-latest Debug (push) Cancelled after 0s
CMake / CMake ubuntu-latest Debug (push) Cancelled after 0s
CMake / CMake windows-latest Debug (push) Cancelled after 0s
CMake / CMake macos-latest Release (push) Cancelled after 0s
CMake / CMake ubuntu-latest Release (push) Cancelled after 0s
CMake / CMake windows-latest Release (push) Cancelled after 0s
CMake / CMake macos-latest Debug (push) Cancelled after 0s
This commit is contained in:
committed by
Cameron Gutman
parent
c7353c0593
commit
0eb84dcca8
+1
-1
@@ -12,7 +12,7 @@ extern "C"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#if defined(_WIN32) && !defined(NXDK)
|
||||
#include "enet/win32.h"
|
||||
#else
|
||||
#include "enet/unix.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
@file unix.c
|
||||
@brief ENet Unix system specific functions
|
||||
*/
|
||||
#ifndef _WIN32
|
||||
#if !defined(_WIN32) || defined(NXDK)
|
||||
|
||||
// Required for IPV6_PKTINFO with Darwin headers
|
||||
#ifndef __APPLE_USE_RFC_3542
|
||||
@@ -104,6 +104,34 @@
|
||||
#ifndef NO_MSGAPI
|
||||
#define NO_MSGAPI 1
|
||||
#endif
|
||||
#elif defined(NXDK)
|
||||
#ifndef HAS_POLL
|
||||
#define HAS_POLL 1
|
||||
#endif
|
||||
#ifndef HAS_FCNTL
|
||||
#define HAS_FCNTL 1
|
||||
#endif
|
||||
#ifndef HAS_IOCTL
|
||||
#define HAS_IOCTL 1
|
||||
#endif
|
||||
#ifndef HAS_INET_PTON
|
||||
#define HAS_INET_PTON 1
|
||||
#endif
|
||||
#ifndef HAS_INET_NTOP
|
||||
#define HAS_INET_NTOP 1
|
||||
#endif
|
||||
#ifndef HAS_SOCKLEN_T
|
||||
#define HAS_SOCKLEN_T 1
|
||||
#endif
|
||||
#ifndef HAS_GETADDRINFO
|
||||
#define HAS_GETADDRINFO 1
|
||||
#endif
|
||||
#ifndef HAS_GETNAMEINFO
|
||||
#define HAS_GETNAMEINFO 1
|
||||
#endif
|
||||
#ifndef NO_MSGAPI
|
||||
#define NO_MSGAPI 1
|
||||
#endif
|
||||
#elif defined(__3DS__)
|
||||
#ifdef AF_INET6
|
||||
#undef AF_INET6
|
||||
@@ -438,7 +466,7 @@ enet_socket_set_option (ENetSocket socket, ENetSocketOption option, int value)
|
||||
{
|
||||
case ENET_SOCKOPT_NONBLOCK:
|
||||
#ifdef HAS_FCNTL
|
||||
result = fcntl (socket, F_SETFL, (value ? O_NONBLOCK : 0) | (fcntl (socket, F_GETFL) & ~O_NONBLOCK));
|
||||
result = fcntl (socket, F_SETFL, (value ? O_NONBLOCK : 0) | (fcntl (socket, F_GETFL, 0) & ~O_NONBLOCK));
|
||||
#else
|
||||
#ifdef HAS_IOCTL
|
||||
result = ioctl (socket, FIONBIO, & value);
|
||||
@@ -715,7 +743,9 @@ enet_socket_send (ENetSocket socket,
|
||||
case EADDRNOTAVAIL:
|
||||
case ENETDOWN:
|
||||
case ENETUNREACH:
|
||||
#if !defined(EHOSTDOWN) || (EHOSTDOWN != EHOSTUNREACH)
|
||||
case EHOSTDOWN:
|
||||
#endif
|
||||
case EHOSTUNREACH:
|
||||
return 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user