diff options
| author | Eli Zaretskii | 2023-07-20 19:09:42 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2023-07-20 19:09:42 +0300 |
| commit | bb885928d73111d2b9c31ff94b71fe18f3506bb4 (patch) | |
| tree | b6a75d62e5e3c51b2be20183fd41cdd55de62ef1 | |
| parent | 39873d6d5d13609d9972619d31f006bbb2e6ac46 (diff) | |
| download | emacs-bb885928d73111d2b9c31ff94b71fe18f3506bb4.tar.gz emacs-bb885928d73111d2b9c31ff94b71fe18f3506bb4.zip | |
Fix NetBSD build --with-sound
* src/sound.c (alsa_write): Use ESTRPIPE only if defined.
(Bug#64698)
| -rw-r--r-- | src/sound.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sound.c b/src/sound.c index 145100cd433..ac29fc1aa1e 100644 --- a/src/sound.c +++ b/src/sound.c | |||
| @@ -1147,6 +1147,7 @@ alsa_write (struct sound_device *sd, const char *buffer, ptrdiff_t nbytes) | |||
| 1147 | alsa_sound_perror ("Can't recover from underrun, prepare failed", | 1147 | alsa_sound_perror ("Can't recover from underrun, prepare failed", |
| 1148 | err); | 1148 | err); |
| 1149 | } | 1149 | } |
| 1150 | #ifdef ESTRPIPE | ||
| 1150 | else if (err == -ESTRPIPE) | 1151 | else if (err == -ESTRPIPE) |
| 1151 | { | 1152 | { |
| 1152 | while ((err = snd_pcm_resume (p->handle)) == -EAGAIN) | 1153 | while ((err = snd_pcm_resume (p->handle)) == -EAGAIN) |
| @@ -1160,6 +1161,7 @@ alsa_write (struct sound_device *sd, const char *buffer, ptrdiff_t nbytes) | |||
| 1160 | err); | 1161 | err); |
| 1161 | } | 1162 | } |
| 1162 | } | 1163 | } |
| 1164 | #endif | ||
| 1163 | else | 1165 | else |
| 1164 | alsa_sound_perror ("Error writing to sound device", err); | 1166 | alsa_sound_perror ("Error writing to sound device", err); |
| 1165 | 1167 | ||