From 3297e2a11e2b09fd7e20af8bc56681e5a0750b25 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 5 Nov 2001 14:09:32 +0000 Subject: [PATCH] (sound_perror): Save errno from being clobbered. --- src/ChangeLog | 4 ++++ src/sound.c | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index ece278922f1..4b65a631218 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2001-11-05 Andreas Schwab + + * sound.c (sound_perror): Save errno from being clobbered. + 2001-11-05 Dale Hagglund * unexelf.c (unexec): Don't use `mmap'. Instead, read and write diff --git a/src/sound.c b/src/sound.c index b3c075ba831..d9fd55966a5 100644 --- a/src/sound.c +++ b/src/sound.c @@ -262,12 +262,14 @@ static void sound_perror (msg) char *msg; { + int saved_errno = errno; + turn_on_atimers (1); #ifdef SIGIO sigunblock (sigmask (SIGIO)); #endif - if (errno != 0) - error ("%s: %s", msg, strerror (errno)); + if (saved_errno != 0) + error ("%s: %s", msg, strerror (saved_errno)); else error ("%s", msg); } -- 2.39.5