summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorlsalzman <[email protected]>2012-09-11 09:57:49 +0300
committerlsalzman <[email protected]>2012-09-11 09:57:49 +0300
commit0fd4c9389b4ebcca855937f9349cee0eea0236b8 (patch)
treea4f8fd705f0e1aed57686e9fdcef9d551da56ce7
parent71b75500495d5e11ba5fbe937e421b349d3d3059 (diff)
downloadenet-0fd4c9389b4ebcca855937f9349cee0eea0236b8.tar.gz
enet-0fd4c9389b4ebcca855937f9349cee0eea0236b8.zip
set some defaults for apple builds without configure script
-rw-r--r--unix.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/unix.c b/unix.c
index c421b7e..7bbe77a 100644
--- a/unix.c
+++ b/unix.c
@@ -18,13 +18,30 @@
#define ENET_BUILDING_LIB 1
#include "enet/enet.h"
-#ifdef HAS_FCNTL
-#include <fcntl.h>
-#endif
-
#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 HAS_FCNTL
+#include <fcntl.h>
+#endif
#ifdef HAS_POLL
#include <sys/poll.h>