From: Mathieu Desnoyers Date: Thu, 23 Feb 2012 15:31:54 +0000 (-0500) Subject: freebsd: do not use MAP_STACK X-Git-Tag: v2.0.0-rc3~33 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=edb025e87637ff74565647ad7756ecac46899d2a;p=lttng-tools.git freebsd: do not use MAP_STACK Signed-off-by: Mathieu Desnoyers --- diff --git a/src/common/runas.c b/src/common/runas.c index ddb2f18bf..88ed77315 100644 --- a/src/common/runas.c +++ b/src/common/runas.c @@ -38,12 +38,16 @@ #define RUNAS_CHILD_STACK_SIZE 10485760 -#ifndef MAP_STACK -#define MAP_STACK 0 +#ifndef __FreeBSD__ +# ifndef MAP_STACK +# define MAP_STACK 0 +# endif +#else /* FreeBSD MAP_STACK always return -ENOMEM */ +# define MAP_STACK 0 #endif #ifndef MAP_GROWSDOWN -#define GROWSDOWN 0 +#define MAP_GROWSDOWN 0 #endif #ifndef MAP_ANONYMOUS