From 3b4cdbdf19c70255d2d4c31b5a7d5ae2548eb9ef Mon Sep 17 00:00:00 2001 From: SASANO Takayoshi Date: Thu, 2 Feb 2023 15:58:47 +0900 Subject: type_compat.h: use ESPIPE instead of EPIPE when ESTRPIPE not defined Fixes: https://github.com/alsa-project/alsa-lib/pull/298 Signed-off-by: SASANO Takayoshi Signed-off-by: Jaroslav Kysela --- include/type_compat.h | 2 +- test/pcm.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/type_compat.h b/include/type_compat.h index 000057f1..b43379c0 100644 --- a/include/type_compat.h +++ b/include/type_compat.h @@ -26,7 +26,7 @@ #define EBADFD EBADF #endif #ifndef ESTRPIPE -#define ESTRPIPE EPIPE +#define ESTRPIPE ESPIPE #endif #ifndef __u16 diff --git a/test/pcm.c b/test/pcm.c index b8d4fe69..0484ea39 100644 --- a/test/pcm.c +++ b/test/pcm.c @@ -12,6 +12,10 @@ #include #include +#ifndef ESTRPIPE +#define ESTRPIPE ESPIPE +#endif + static char *device = "plughw:0,0"; /* playback device */ static snd_pcm_format_t format = SND_PCM_FORMAT_S16; /* sample format */ static unsigned int rate = 44100; /* stream rate */ -- cgit v1.2.1