set some defaults for apple builds without configure script

This commit is contained in:
lsalzman 2012-09-11 09:57:49 +03:00
parent 71b7550049
commit 0fd4c9389b

25
unix.c
View file

@ -18,12 +18,29 @@
#define ENET_BUILDING_LIB 1 #define ENET_BUILDING_LIB 1
#include "enet/enet.h" #include "enet/enet.h"
#ifdef HAS_FCNTL #ifdef __APPLE__
#include <fcntl.h> #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 #endif
#ifdef __APPLE__ #ifdef HAS_FCNTL
#undef HAS_POLL #include <fcntl.h>
#endif #endif
#ifdef HAS_POLL #ifdef HAS_POLL