summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch')
-rw-r--r--meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch b/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch
new file mode 100644
index 0000000000..41b3c23a40
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch
@@ -0,0 +1,50 @@
1From 2555c5d62229cf269974f6ec6e4689ab97bbda42 Mon Sep 17 00:00:00 2001
2From: "Hong H. Pham" <hong.pham@windriver.com>
3Date: Tue, 26 Feb 2013 19:40:04 -0500
4Subject: [PATCH] Check if wordexp function is supported
5
6eglibc could be configured to build without wordexp, so it is not enough
7to check if wordexp.h exists (the header file could be installed, but it's
8possible that the wordexp() function is not supported). An additional
9check if wordexp() is supported by the system C library is needed.
10
11Upstream-Status: Pending
12
13Signed-off-by: Hong H. Pham <hong.pham@windriver.com>
14---
15 configure.in | 5 ++++-
16 src/userfile.c | 2 +-
17 2 files changed, 5 insertions(+), 2 deletions(-)
18
19diff --git a/configure.in b/configure.in
20index 4bcb0d6..ba1c2dd 100644
21--- a/configure.in
22+++ b/configure.in
23@@ -333,7 +333,10 @@ arm*)
24 esac
25
26 dnl Check for wordexp.h
27-AC_CHECK_HEADERS([wordexp.h])
28+AC_CHECK_HEADERS([wordexp.h],
29+ dnl Make sure wordexp is supported by the C library
30+ AC_CHECK_FUNCS([wordexp])
31+)
32
33 dnl Check for resmgr support...
34 AC_MSG_CHECKING(for resmgr support)
35diff --git a/src/userfile.c b/src/userfile.c
36index 3a73836..b8ce809 100644
37--- a/src/userfile.c
38+++ b/src/userfile.c
39@@ -32,7 +32,7 @@
40 * stores the first matchine one. The returned string is strdup'ed.
41 */
42
43-#ifdef HAVE_WORDEXP_H
44+#if (defined(HAVE_WORDEXP_H) && defined(HAVE_WORDEXP))
45 #include <wordexp.h>
46 #include <assert.h>
47 int snd_user_file(const char *file, char **result)
48--
491.7.10.4
50