aboutsummaryrefslogtreecommitdiff
path: root/lang/guile/files/patch-libguile_threads.c
diff options
context:
space:
mode:
Diffstat (limited to 'lang/guile/files/patch-libguile_threads.c')
-rw-r--r--lang/guile/files/patch-libguile_threads.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/lang/guile/files/patch-libguile_threads.c b/lang/guile/files/patch-libguile_threads.c
new file mode 100644
index 000000000000..ad966b88392d
--- /dev/null
+++ b/lang/guile/files/patch-libguile_threads.c
@@ -0,0 +1,27 @@
+--- libguile/threads.c 2008-02-27 10:17:41.531443640 -0600
++++ libguile/threads.c 2008-02-27 10:25:44.309334685 -0600
+@@ -593,7 +593,7 @@
+
+ #if SCM_USE_PTHREAD_THREADS
+
+-#if HAVE_PTHREAD_ATTR_GETSTACK && HAVE_PTHREAD_GETATTR_NP
++#if HAVE_PTHREAD_ATTR_GETSTACK && (HAVE_PTHREAD_GETATTR_NP || HAVE_PTHREAD_ATTR_GET_NP)
+ /* This method for GNU/Linux and perhaps some other systems.
+ It's not for MacOS X or Solaris 10, since pthread_getattr_np is not
+ available on them. */
+@@ -606,8 +606,15 @@
+ void *start, *end;
+ size_t size;
+
++#if HAVE_PTHREAD_ATTR_GET_NP
++ pthread_attr_init (&attr);
++ pthread_attr_get_np (pthread_self (), &attr);
++ pthread_attr_getstack (&attr, &start, &size);
++ pthread_attr_destroy (&attr);
++#elif HAVE_PTHREAD_GETATTR_NP
+ pthread_getattr_np (pthread_self (), &attr);
+ pthread_attr_getstack (&attr, &start, &size);
++#endif
+ end = (char *)start + size;
+
+ /* XXX - pthread_getattr_np from LinuxThreads does not seem to work