Skip to contentSkip to conversation

alsa-lib: dlmisc: Add a fake dl lib head file when dl lib is not supported by the toolchain

PATCH New sonic.adi at gmail.com 2 participants 2 messages Nov 25, 2013 – Feb 12, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 alsa-lib: dlmisc: Add a fake dl lib head file when dl lib is not supported by the toolchain

From: Sonic Zhang <[email protected]>

The FLAT GNU toolchain doesn't include the dlfcn.h header file.

---
 package/alsa-lib/alsa-lib-003-dlmisc.patch |   59 ++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)
 create mode 100644 package/alsa-lib/alsa-lib-003-dlmisc.patch
package/alsa-lib/alsa-lib-003-dlmisc.patch new file +59 -0
new file mode 100644
index 0000000..612fa5a
@@ -0,0 +1,59 @@
+alsa-lib: dlmisc: Add a fake dl lib head file when dl lib is not supported by the toolchain.
+
+The FLAT GNU toolchain doesn't include the dlfcn.h header file.
+
+--- alsa-lib-1.0.26/src/mixer/simple_abst.c	2012-09-06 16:55:14.000000000 +0800
++++ alsa-lib-1.0.26.bak/src/mixer/simple_abst.c	2013-11-25 14:53:07.739275843 +0800
+@@ -34,7 +34,11 @@
+ #include <fcntl.h>
+ #include <sys/ioctl.h>
+ #include <math.h>
++#ifdef HAVE_LIBDL
+ #include <dlfcn.h>
++#else
++#include <dlmisc.h>
++#endif
+ #include "config.h"
+ #include "asoundlib.h"
+ #include "mixer_simple.h"
+--- alsa-lib-1.0.26/modules/mixer/simple/sbasedl.c	2012-09-06 16:55:14.000000000 +0800
++++ alsa-lib-1.0.26.bak/modules/mixer/simple/sbasedl.c	2013-11-25 14:53:40.871279553 +0800
+@@ -27,7 +27,11 @@
+ #include <fcntl.h>
+ #include <sys/ioctl.h>
+ #include <math.h>
++#ifdef HAVE_LIBDL
+ #include <dlfcn.h>
++#else
++#include <dlmisc.h>
++#endif
+ #include "config.h"
+ #include "asoundlib.h"
+ #include "mixer_abst.h"
+--- /dev/null	2013-11-25 21:32:41.194714253 +0800
++++ alsa-lib-1.0.26.bak/include/dlmisc.h	2013-11-25 15:03:11.031307047 +0800
+@@ -0,0 +1,24 @@
++/*
++ *   This library is free software; you can redistribute it and/or modify
++ *   it under the terms of the GNU Lesser General Public License as
++ *   published by the Free Software Foundation; either version 2.1 of
++ *   the License, or (at your option) any later version.
++ *
++ *   This program is distributed in the hope that it will be useful,
++ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ *   GNU Lesser General Public License for more details.
++ *
++ *   You should have received a copy of the GNU Lesser General Public
++ *   License along with this library; if not, write to the Free Software
++ *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
++ *
++ */
++
++#ifndef __ALSA_DLMISC_H
++#define __ALSA_DLMISC_H
++
++#define RTLD_NOW	0x00002
++#define RTLD_GLOBAL	0x00100
++
++#endif
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 alsa-lib: dlmisc: Add a fake dl lib head file when dl lib is not supported by the toolchain

Quoted 76 lines · On Mon, Nov 25, 2013 at 8:23 AM, <[email protected]> wrote:

From: Sonic Zhang <[email protected]>

The FLAT GNU toolchain doesn't include the dlfcn.h header file.

---
 package/alsa-lib/alsa-lib-003-dlmisc.patch |   59 ++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)
 create mode 100644 package/alsa-lib/alsa-lib-003-dlmisc.patch
package/alsa-lib/alsa-lib-003-dlmisc.patch new file +59 -1
new file mode 100644
index 0000000..612fa5a
@@ -0,0 +1,59 @@
+alsa-lib: dlmisc: Add a fake dl lib head file when dl lib is not supported by the toolchain.
+
+The FLAT GNU toolchain doesn't include the dlfcn.h header file.
+
+--- alsa-lib-1.0.26/src/mixer/simple_abst.c    2012-09-06 16:55:14.000000000 +0800
++++ alsa-lib-1.0.26.bak/src/mixer/simple_abst.c        2013-11-25 14:53:07.739275843 +0800
+@@ -34,7 +34,11 @@
+ #include <fcntl.h>
+ #include <sys/ioctl.h>
+ #include <math.h>
++#ifdef HAVE_LIBDL
+ #include <dlfcn.h>
++#else
++#include <dlmisc.h>
++#endif
+ #include "config.h"
+ #include "asoundlib.h"
+ #include "mixer_simple.h"
+--- alsa-lib-1.0.26/modules/mixer/simple/sbasedl.c     2012-09-06 16:55:14.000000000 +0800
++++ alsa-lib-1.0.26.bak/modules/mixer/simple/sbasedl.c 2013-11-25 14:53:40.871279553 +0800
+@@ -27,7 +27,11 @@
+ #include <fcntl.h>
+ #include <sys/ioctl.h>
+ #include <math.h>
++#ifdef HAVE_LIBDL
+ #include <dlfcn.h>
++#else
++#include <dlmisc.h>
++#endif
+ #include "config.h"
+ #include "asoundlib.h"
+ #include "mixer_abst.h"
+--- /dev/null  2013-11-25 21:32:41.194714253 +0800
++++ alsa-lib-1.0.26.bak/include/dlmisc.h       2013-11-25 15:03:11.031307047 +0800
+@@ -0,0 +1,24 @@
++/*
++ *   This library is free software; you can redistribute it and/or modify
++ *   it under the terms of the GNU Lesser General Public License as
++ *   published by the Free Software Foundation; either version 2.1 of
++ *   the License, or (at your option) any later version.
++ *
++ *   This program is distributed in the hope that it will be useful,
++ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ *   GNU Lesser General Public License for more details.
++ *
++ *   You should have received a copy of the GNU Lesser General Public
++ *   License along with this library; if not, write to the Free Software
++ *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
++ *
++ */
++
++#ifndef __ALSA_DLMISC_H
++#define __ALSA_DLMISC_H
++
++#define RTLD_NOW      0x00002
++#define RTLD_GLOBAL   0x00100
++
++#endif
--
Quoted 1 line

1.7.9.5

(compile-tested on a Blackfin FLAT configuration)

This patch fixes
http://autobuild.buildroot.net/results/706/7069e1f43cbed745d65f7dd9904a3fff034530ac.
(Peter: maybe you should add this link to the commit message)

Best regards,
Thomas