summaryrefslogtreecommitdiffstats
path: root/patches/alsa-lib-1.2.5.1/0002-fix-build-with-disable-ucm.patch
blob: 88637479545fcf14d929d1aba650779588909b64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From: Jaroslav Kysela <perex@perex.cz>
Date: Mon, 28 Jun 2021 12:08:53 +0200
Subject: [PATCH] fix build with --disable-ucm

Link: https://mailman.alsa-project.org/pipermail/alsa-devel/2021-June/186729.html
Reported-by: Michael Forney <mforney@mforney.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
 include/local.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/include/local.h b/include/local.h
index 4e7d88a0ecac..7cfcec53dd5d 100644
--- a/include/local.h
+++ b/include/local.h
@@ -374,6 +374,8 @@ int _snd_config_load_with_include(snd_config_t *config, snd_input_t *in,
 void *INTERNAL(snd_dlopen)(const char *name, int mode, char *errbuf, size_t errbuflen);
 #endif
 
+#ifdef BUILD_UCM
+
 const char *uc_mgr_alibcfg_by_device(snd_config_t **config, const char *name);
 
 static inline int _snd_is_ucm_device(const char *name)
@@ -381,4 +383,12 @@ static inline int _snd_is_ucm_device(const char *name)
 	return name && name[0] == '_' && name[1] == 'u' && name[2] == 'c' && name[3] == 'm';
 }
 
+#else
+
+static inline const char *uc_mgr_alibcfg_by_device(snd_config_t **config, const char *name) { return NULL; }
+static inline int _snd_is_ucm_device(const char *name) { return 0; }
+
+
+#endif
+
 #endif