Fix NetBSD build --with-sound

* src/sound.c (alsa_write): Use ESTRPIPE only if defined.
(Bug#64698)
This commit is contained in:
Eli Zaretskii 2023-07-20 19:09:42 +03:00
parent 39873d6d5d
commit bb885928d7

View file

@ -1147,6 +1147,7 @@ alsa_write (struct sound_device *sd, const char *buffer, ptrdiff_t nbytes)
alsa_sound_perror ("Can't recover from underrun, prepare failed",
err);
}
#ifdef ESTRPIPE
else if (err == -ESTRPIPE)
{
while ((err = snd_pcm_resume (p->handle)) == -EAGAIN)
@ -1160,6 +1161,7 @@ alsa_write (struct sound_device *sd, const char *buffer, ptrdiff_t nbytes)
err);
}
}
#endif
else
alsa_sound_perror ("Error writing to sound device", err);