summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSASANO Takayoshi <uaa@uaa.org.uk>2023-02-02 15:58:47 +0900
committerJaroslav Kysela <perex@perex.cz>2023-02-03 13:21:54 +0100
commit3b4cdbdf19c70255d2d4c31b5a7d5ae2548eb9ef (patch)
tree1f93b09ab7c196a183c2c118b239f4ea41203f75
parentfea9fc229892695afa4e41598ebb79ea58ffb4b2 (diff)
downloadalsa-lib-3b4cdbdf19c70255d2d4c31b5a7d5ae2548eb9ef.tar.gz
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 <uaa@uaa.org.uk> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-rw-r--r--include/type_compat.h2
-rw-r--r--test/pcm.c4
2 files changed, 5 insertions, 1 deletions
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 <sys/time.h>
#include <math.h>
+#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 */