summaryrefslogtreecommitdiff
path: root/cont.c
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-30 00:51:46 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-30 00:51:46 +0000
commit3ffa44622db2386727a8e11bb3aeb0385621f9fa (patch)
tree3b7b7480ae4cae97f35017799d112683cf057dcd /cont.c
parent0cebfad20ab9eb694eeb95f083635127cfbf35f9 (diff)
* cont.c (fiber_entry): fix stack allocation failure on Debian
GNU/kFreeBSD. Patch by Lucas Nussbaum <lucas at lucas-nussbaum dot net>. [Bug #5241] [ruby-core:39147] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'cont.c')
-rw-r--r--cont.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cont.c b/cont.c
index 1c17eae..3e68d89 100644
--- a/cont.c
+++ b/cont.c
@@ -520,8 +520,9 @@ fiber_entry(void *arg)
/*
* FreeBSD require a first (i.e. addr) argument of mmap(2) is not NULL
* if MAP_STACK is passed.
+ * http://www.FreeBSD.org/cgi/query-pr.cgi?pr=158755
*/
-#if defined(MAP_STACK) && !defined(__FreeBSD__)
+#if defined(MAP_STACK) && !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__)
#define FIBER_STACK_FLAGS (MAP_PRIVATE | MAP_ANON | MAP_STACK)
#else
#define FIBER_STACK_FLAGS (MAP_PRIVATE | MAP_ANON)