summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pulp.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/pulp.c b/src/pulp.c
index 9cfdbc5..ee32b7c 100644
--- a/src/pulp.c
+++ b/src/pulp.c
@@ -27,6 +27,12 @@
*
*/
+#ifdef __MACH__
+#ifndef _XOPEN_SOURCE
+#define _XOPEN_SOURCE
+#endif
+#endif
+
#include <assert.h>
#include <errno.h>
#include <thunk.h>
@@ -46,9 +52,15 @@
#define PULP_USECS_PER_SEC 1000000ULL
#define PULP_USECS_PER_MSEC 1000ULL
-#define PULP_FIBER_STACK_SIZE (16 * 1024)
#define PULP_FIBER_ALLOC_NUM 32
+#ifdef __MACH__
+#include <signal.h>
+#define PULP_FIBER_STACK_SIZE SIGSTKSZ
+#else
+#define PULP_FIBER_STACK_SIZE (16 * 1024)
+#endif
+
typedef struct pulp_context_t {
#ifdef __WIN32__
LPVOID win32_fiber;
© All Rights Reserved