[oe-commits] Jesse Zhang : alsa-lib: check if wordexp is supported in libc

git at git.openembedded.org git at git.openembedded.org
Mon Jun 17 15:56:33 UTC 2013


Module: openembedded-core.git
Branch: master-next
Commit: 3c3fe1d139fc84d7ff125f87a4692fac6dfc04e6
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=3c3fe1d139fc84d7ff125f87a4692fac6dfc04e6

Author: Jesse Zhang <sen.zhang at windriver.com>
Date:   Mon Jun 17 12:23:18 2013 +0000

alsa-lib: check if wordexp is supported in libc

eglibc could be configured to build without the wordexp feature.  To
ensure that the wordexp feature could be used, the configure script must
check if wordexp() is supported in libc in addition to checking if
wordexp.h exists.

Signed-off-by: Hong H. Pham <hong.pham at windriver.com>
Signed-off-by: Jesse Zhang <sen.zhang at windriver.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 .../Check-if-wordexp-function-is-supported.patch   |   50 ++++++++++++++++++++
 meta/recipes-multimedia/alsa/alsa-lib_1.0.26.bb    |    1 +
 2 files changed, 51 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 0000000..41b3c23
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch
@@ -0,0 +1,50 @@
+From 2555c5d62229cf269974f6ec6e4689ab97bbda42 Mon Sep 17 00:00:00 2001
+From: "Hong H. Pham" <hong.pham at windriver.com>
+Date: Tue, 26 Feb 2013 19:40:04 -0500
+Subject: [PATCH] Check if wordexp function is supported
+
+eglibc could be configured to build without wordexp, so it is not enough
+to check if wordexp.h exists (the header file could be installed, but it's
+possible that the wordexp() function is not supported).  An additional
+check if wordexp() is supported by the system C library is needed.
+
+Upstream-Status: Pending
+
+Signed-off-by: Hong H. Pham <hong.pham at windriver.com>
+---
+ configure.in   |    5 ++++-
+ src/userfile.c |    2 +-
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 4bcb0d6..ba1c2dd 100644
+--- a/configure.in
++++ b/configure.in
+@@ -333,7 +333,10 @@ arm*)
+ esac
+ 
+ dnl Check for wordexp.h
+-AC_CHECK_HEADERS([wordexp.h])
++AC_CHECK_HEADERS([wordexp.h],
++  dnl Make sure wordexp is supported by the C library
++  AC_CHECK_FUNCS([wordexp])
++)
+ 
+ dnl Check for resmgr support...
+ AC_MSG_CHECKING(for resmgr support)
+diff --git a/src/userfile.c b/src/userfile.c
+index 3a73836..b8ce809 100644
+--- a/src/userfile.c
++++ b/src/userfile.c
+@@ -32,7 +32,7 @@
+  * stores the first matchine one.  The returned string is strdup'ed.
+  */
+ 
+-#ifdef HAVE_WORDEXP_H
++#if (defined(HAVE_WORDEXP_H) && defined(HAVE_WORDEXP))
+ #include <wordexp.h>
+ #include <assert.h>
+ int snd_user_file(const char *file, char **result)
+-- 
+1.7.10.4
+
diff --git a/meta/recipes-multimedia/alsa/alsa-lib_1.0.26.bb b/meta/recipes-multimedia/alsa/alsa-lib_1.0.26.bb
index 2695e6b..6f22d06 100644
--- a/meta/recipes-multimedia/alsa/alsa-lib_1.0.26.bb
+++ b/meta/recipes-multimedia/alsa/alsa-lib_1.0.26.bb
@@ -20,6 +20,7 @@ SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-${PV}.tar.bz2 \
            file://fix-tstamp-declaration.patch \
            file://obsolete_automake_macros.patch \
            file://fix-O0-Optimize-unable-inline-function.patch \
+           file://Check-if-wordexp-function-is-supported.patch \
           "
 SRC_URI[md5sum] = "2dfa35d28471d721e592b616beedf965"
 SRC_URI[sha256sum] = "8c9f8161603cc3db640619650401292c3e110da63429ab6938aac763319f6e7d"



More information about the Openembedded-commits mailing list