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 | |
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
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | thread_pthread.c | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,9 @@ +Tue Jan 28 15:27:36 2014 NARUSE, Yui <naruse@ruby-lang.org> + + * thread_pthread.c: rlimit is only available on Linux. + At least r44712 breaks FreeBSD. + [ruby-core:60113] [Bug #9454] + Tue Jan 28 15:17:59 2014 Zachary Scott <e@zzak.io> * lib/set.rb: [DOC] Add examples for Set#intersect? and Set#disjoint? 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) { |