From edc587d28e2bfe4d50fd975e2c66cb41e6907d13 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Wed, 16 May 2018 19:29:12 -0700 Subject: libpulp: experimental considerations for OSX I don't have an OSX system to test with, but after some digging this looks like it might suffice. --- src/pulp.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src') 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 #include #include @@ -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 +#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; -- cgit v1.2.3