aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--thread_pthread.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1e0063ccba..1c069a056e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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) {