summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-07-02 17:10:39 -0700
committerMichael Forney <mforney@mforney.org>2019-07-03 00:53:07 -0700
commit9cd9b35cf50287bb8bc851a9524460a8fadd93e3 (patch)
tree752d5d9ad67f637f924b8f6c72379d673fbd2890 /pkg
parent55680dadfb6a5c9c5d728e67d674153af6c781e0 (diff)
alsa-lib: Avoid out-of-range enum constants
Diffstat (limited to 'pkg')
-rw-r--r--pkg/alsa-lib/patch/0008-Use-define-for-constants-that-can-t-be-represented-a.patch31
-rw-r--r--pkg/alsa-lib/ver2
2 files changed, 32 insertions, 1 deletions
diff --git a/pkg/alsa-lib/patch/0008-Use-define-for-constants-that-can-t-be-represented-a.patch b/pkg/alsa-lib/patch/0008-Use-define-for-constants-that-can-t-be-represented-a.patch
new file mode 100644
index 00000000..b1ed85fb
--- /dev/null
+++ b/pkg/alsa-lib/patch/0008-Use-define-for-constants-that-can-t-be-represented-a.patch
@@ -0,0 +1,31 @@
+From 02d453299c908983ec4333e9a924023e639df19f Mon Sep 17 00:00:00 2001
+From: Michael Forney <mforney@mforney.org>
+Date: Tue, 2 Jul 2019 16:04:41 -0700
+Subject: [PATCH] Use #define for constants that can't be represented as int
+
+---
+ include/sound/asound.h | 8 +++-----
+ 1 file changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/include/sound/asound.h b/include/sound/asound.h
+index 4d35c84d..a616f95c 100644
+--- a/include/sound/asound.h
++++ b/include/sound/asound.h
+@@ -312,11 +312,9 @@ typedef int __bitwise snd_pcm_state_t;
+ #define SNDRV_PCM_STATE_DISCONNECTED ((__force snd_pcm_state_t) 8) /* hardware is disconnected */
+ #define SNDRV_PCM_STATE_LAST SNDRV_PCM_STATE_DISCONNECTED
+
+-enum {
+- SNDRV_PCM_MMAP_OFFSET_DATA = 0x00000000,
+- SNDRV_PCM_MMAP_OFFSET_STATUS = 0x80000000,
+- SNDRV_PCM_MMAP_OFFSET_CONTROL = 0x81000000,
+-};
++#define SNDRV_PCM_MMAP_OFFSET_DATA 0x00000000
++#define SNDRV_PCM_MMAP_OFFSET_STATUS 0x80000000
++#define SNDRV_PCM_MMAP_OFFSET_CONTROL 0x81000000
+
+ union snd_pcm_sync_id {
+ unsigned char id[16];
+--
+2.22.0
+
diff --git a/pkg/alsa-lib/ver b/pkg/alsa-lib/ver
index d483df63..f813eb95 100644
--- a/pkg/alsa-lib/ver
+++ b/pkg/alsa-lib/ver
@@ -1 +1 @@
-1.1.9 r1
+1.1.9 r2