diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-01-28 06:29:51 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-01-28 06:29:51 +0000 |
commit | 239c9942439817e3075b57612b028ada546aea0d (patch) | |
tree | 5806f3a7ae990c401b88d76b4c079ccf148b598f /thread_pthread.c | |
parent | fa4af4d4cd49be48e92ee7f5fb3588f51924b258 (diff) | |
download | ruby-239c9942439817e3075b57612b028ada546aea0d.tar.gz |
* thread_pthread.c: rlimit is only available on Linux.
At least r44712 breaks FreeBSD.
[ruby-core:60113] [Bug #9454]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
-rw-r--r-- | thread_pthread.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/thread_pthread.c b/thread_pthread.c index b998083dca..63da3c9799 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -1562,7 +1562,7 @@ ruby_stack_overflowed_p(const rb_thread_t *th, const void *addr) if (th) { size = th->machine.stack_maxsize; -#if defined(HAVE_GETRLIMIT) && MAINSTACKADDR_AVAILABLE +#if defined(HAVE_GETRLIMIT) && defined(__linux__) && MAINSTACKADDR_AVAILABLE if (pthread_equal(th->thread_id, native_main_thread.id)) { struct rlimit rlim; if (getrlimit(RLIMIT_STACK, &rlim) == 0 && rlim.rlim_cur > size) { |