From 5419f16c75234feb80268cf2a6a1983fc2eb3acd Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 5 Nov 2001 14:08:30 +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 4acf6f205b7..5d67698a2bc 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 a0c1106b05f..00d5fa2d073 100644 --- a/src/sound.c +++ b/src/sound.c @@ -261,12 +261,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.2