[OE-core] [PATCH 14/17] gdk-pixbuf: Fix latent build issue exposed by musl

Khem Raj raj.khem at gmail.com
Sat Dec 19 23:52:23 UTC 2015


Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 .../gdk-pixbuf/gdk-pixbuf/libc_memfuncs.patch      | 25 ++++++++++++++++++++++
 meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.32.1.bb |  1 +
 2 files changed, 26 insertions(+)
 create mode 100644 meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/libc_memfuncs.patch

diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/libc_memfuncs.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/libc_memfuncs.patch
new file mode 100644
index 0000000..706debf
--- /dev/null
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/libc_memfuncs.patch
@@ -0,0 +1,25 @@
+__libc_malloc and family of functions are in glibc but not in musl e.g. so mark them as such
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+
+Index: gdk-pixbuf-2.32.1/tests/pixbuf-lowmem.c
+===================================================================
+--- gdk-pixbuf-2.32.1.orig/tests/pixbuf-lowmem.c
++++ gdk-pixbuf-2.32.1/tests/pixbuf-lowmem.c
+@@ -33,9 +33,15 @@ static int max_allocation = PRETEND_MEM_
+ 
+ #define HEADER_SPACE sizeof(gsize)
+ 
++#ifdef __GLIBC__
+ extern void *__libc_malloc (size_t size);
+ extern void *__libc_realloc (void *mem, size_t size);
+ extern void *__libc_free (void *mem);
++#else
++#define __libc_malloc  malloc
++#define __libc_realloc realloc
++#define __libc_free free
++#endif
+ 
+ static gpointer
+ record_bytes (gpointer mem, gsize bytes)
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.32.1.bb b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.32.1.bb
index 084fe36..104c743 100644
--- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.32.1.bb
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.32.1.bb
@@ -17,6 +17,7 @@ SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
            file://extending-libinstall-dependencies.patch \
            file://run-ptest \
            file://fatal-loader.patch \
+           file://libc_memfuncs.patch \
            "
 
 SRC_URI[md5sum] = "b1590189a2e89fab9f871959c168508c"
-- 
2.6.4




More information about the Openembedded-core mailing list