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
#include "enet/enet.h"
#ifdef HAS_FCNTL
#include <fcntl.h>
#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 <fcntl.h>
#endif
#ifdef HAS_POLL