From: Andreas Schwab Date: Mon, 5 Nov 2001 14:09:32 +0000 (+0000) Subject: (sound_perror): Save errno from being clobbered. X-Git-Tag: ttn-vms-21-2-B4~18807 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3297e2a11e2b09fd7e20af8bc56681e5a0750b25;p=emacs.git (sound_perror): Save errno from being clobbered. --- 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); }