aboutsummaryrefslogtreecommitdiff
path: root/package/alsa-lib/0002-alsa-lib-provide-dummy-definitions-of-RTLD_-if-neces.patch
blob: f489f913d9a7cad00c12b0c1ca5d8870bcb5cdf6 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
From ff91d50a250e10a419bcd35176f3069161ac33bb Mon Sep 17 00:00:00 2001
From: Sonic Zhang <sonic.zhang@analog.com>
Date: Fri, 13 Apr 2018 09:11:23 +0200
Subject: [PATCH] alsa-lib: provide dummy definitions of RTLD_* if necessary
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The FLAT GNU toolchain (e.g. blackfin) doesn't include the dlfcn.h header
file, so we need to guard that include. Additionally, provide dummy
definitions for parameters RTLD_GLOBAL / RTLD_NOW which are normally
provided by dlfcn.h.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
[Thomas: don't add separate dlmisc.h, move dummy defs to global.h]
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
[Jörg: update for 1.1.6]
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
---
 modules/mixer/simple/sbasedl.c | 4 +++-
 src/mixer/simple_abst.c        | 3 +++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/modules/mixer/simple/sbasedl.c b/modules/mixer/simple/sbasedl.c
index d8cbf0f1..daa0ab30 100644
--- a/modules/mixer/simple/sbasedl.c
+++ b/modules/mixer/simple/sbasedl.c
@@ -27,8 +27,10 @@
 #include <fcntl.h>
 #include <sys/ioctl.h>
 #include <math.h>
-#include <dlfcn.h>
 #include "config.h"
+#ifdef HAVE_DLFCN
+#include <dlfcn.h>
+#endif
 #include "asoundlib.h"
 #include "mixer_abst.h"
 #include "sbase.h"
diff --git a/src/mixer/simple_abst.c b/src/mixer/simple_abst.c
index 9c61cb58..0ca58fe0 100644
--- a/src/mixer/simple_abst.c
+++ b/src/mixer/simple_abst.c
@@ -34,7 +34,10 @@
 #include <fcntl.h>
 #include <sys/ioctl.h>
 #include <math.h>
+#include "config.h"
+#ifdef HAVE_DLFCN
 #include <dlfcn.h>
+#endif
 #include "mixer_local.h"
 #include "mixer_simple.h"
 
-- 
2.14.3