diff options
| author | Michael Forney <mforney@mforney.org> | 2020-11-05 00:31:48 -0800 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2020-11-05 12:42:18 -0800 |
| commit | 817c3900b0fd9ad2355f9709e86b0cfb4b8e3b10 (patch) | |
| tree | 512e15220e48fe5ff584203ecbb86164e7c2376c /pkg/sndio/patch | |
| parent | add900e7b06008cd0d2cc475ce8a2f06a11c30f3 (diff) | |
Add sndio 1.7.0
Diffstat (limited to 'pkg/sndio/patch')
| -rw-r--r-- | pkg/sndio/patch/0001-sndiod-Fix-build-without-DEBUG.patch | 58 | ||||
| -rw-r--r-- | pkg/sndio/patch/0002-aucat-Use-unsigned-char-for-wav_guid-to-prevent-over.patch | 26 |
2 files changed, 84 insertions, 0 deletions
diff --git a/pkg/sndio/patch/0001-sndiod-Fix-build-without-DEBUG.patch b/pkg/sndio/patch/0001-sndiod-Fix-build-without-DEBUG.patch new file mode 100644 index 00000000..9236b108 --- /dev/null +++ b/pkg/sndio/patch/0001-sndiod-Fix-build-without-DEBUG.patch @@ -0,0 +1,58 @@ +From 4ee56f07ef8be718bb1f24f5b73c440527c93bc9 Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Thu, 5 Nov 2020 00:28:06 -0800 +Subject: [PATCH] sndiod: Fix build without DEBUG + +--- + aucat/afile.c | 4 ++-- + sndiod/listen.c | 4 ++++ + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/aucat/afile.c b/aucat/afile.c +index b880878..3e400ce 100644 +--- a/aucat/afile.c ++++ b/aucat/afile.c +@@ -743,13 +743,13 @@ afile_au_writehdr(struct afile *f) + case 32: + fmt = AU_FMT_PCM32; + break; +-#ifdef DEBUG + default: ++#ifdef DEBUG + log_puts(f->path); + log_puts(": wrong precision\n"); + panic(); +- return 0; + #endif ++ return 0; + } + be32_set(&hdr.fmt, fmt); + be32_set(&hdr.rate, f->rate); +diff --git a/sndiod/listen.c b/sndiod/listen.c +index 54c9684..c87f600 100644 +--- a/sndiod/listen.c ++++ b/sndiod/listen.c +@@ -254,16 +254,20 @@ listen_in(void *arg) + return; + } + if (fcntl(sock, F_SETFL, O_NONBLOCK) == -1) { ++#ifdef DEBUG + file_log(f->file); + log_puts(": failed to set non-blocking mode\n"); ++#endif + goto bad_close; + } + if (f->path == NULL) { + opt = 1; + if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, + &opt, sizeof(int)) == -1) { ++#ifdef DEBUG + file_log(f->file); + log_puts(": failed to set TCP_NODELAY flag\n"); ++#endif + goto bad_close; + } + } +-- +2.29.2 + diff --git a/pkg/sndio/patch/0002-aucat-Use-unsigned-char-for-wav_guid-to-prevent-over.patch b/pkg/sndio/patch/0002-aucat-Use-unsigned-char-for-wav_guid-to-prevent-over.patch new file mode 100644 index 00000000..12e8149d --- /dev/null +++ b/pkg/sndio/patch/0002-aucat-Use-unsigned-char-for-wav_guid-to-prevent-over.patch @@ -0,0 +1,26 @@ +From 3ae08254ba1f5555e0bfcf71be12d67a3ea2a1b5 Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Thu, 5 Nov 2020 00:58:34 -0800 +Subject: [PATCH] aucat: Use unsigned char for wav_guid to prevent overflow + +0x80 is not representable as char. +--- + aucat/afile.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/aucat/afile.c b/aucat/afile.c +index 3e400ce..f1188b5 100644 +--- a/aucat/afile.c ++++ b/aucat/afile.c +@@ -135,7 +135,7 @@ char wav_id_riff[4] = {'R', 'I', 'F', 'F'}; + char wav_id_wave[4] = {'W', 'A', 'V', 'E'}; + char wav_id_data[4] = {'d', 'a', 't', 'a'}; + char wav_id_fmt[4] = {'f', 'm', 't', ' '}; +-char wav_guid[14] = { ++unsigned char wav_guid[14] = { + 0x00, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x80, 0x00, + 0x00, 0xAA, 0x00, 0x38, +-- +2.29.2 + |
