summaryrefslogtreecommitdiff
path: root/libguile/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'libguile/error.c')
-rw-r--r--libguile/error.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libguile/error.c b/libguile/error.c
index 300d333cb..28b5bc150 100644
--- a/libguile/error.c
+++ b/libguile/error.c
@@ -131,7 +131,10 @@ SCM_DEFINE (scm_strerror, "strerror", 1, 0, 0,
{
SCM ret;
scm_frame_begin (0);
- scm_frame_pthread_mutex_lock (&scm_i_misc_mutex);
+ scm_frame_unwind_handler ((void(*)(void*)) scm_mutex_unlock,
+ &scm_i_misc_mutex,
+ SCM_F_WIND_EXPLICITLY);
+ scm_mutex_lock (&scm_i_misc_mutex);
ret = scm_from_locale_string (SCM_I_STRERROR (scm_to_int (err)));