From 0fd4c9389b4ebcca855937f9349cee0eea0236b8 Mon Sep 17 00:00:00 2001 From: lsalzman Date: Tue, 11 Sep 2012 09:57:49 +0300 Subject: [PATCH] set some defaults for apple builds without configure script --- unix.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/unix.c b/unix.c index c421b7e..7bbe77a 100644 --- a/unix.c +++ b/unix.c @@ -18,12 +18,29 @@ #define ENET_BUILDING_LIB 1 #include "enet/enet.h" -#ifdef HAS_FCNTL -#include +#ifdef __APPLE__ +#ifdef HAS_POLL +#undef HAS_POLL +#endif +#ifndef HAS_FCNTL +#define HAS_FCNTL 1 +#endif +#ifndef HAS_INET_PTON +#define HAS_INET_PTON 1 +#endif +#ifndef HAS_INET_NTOP +#define HAS_INET_NTOP 1 +#endif +#ifndef HAS_MSGHDR_FLAGS +#define HAS_MSGHDR_FLAGS 1 +#endif +#ifndef HAS_SOCKLEN_T +#define HAS_SOCKLEN_T 1 +#endif #endif -#ifdef __APPLE__ -#undef HAS_POLL +#ifdef HAS_FCNTL +#include #endif #ifdef HAS_POLL