diff mbox

[oe,meta-oe,2/3] udisks2: Update to 2.1.7

Message ID 20160815050434.20974-2-raj.khem@gmail.com
State New
Headers show

Commit Message

Khem Raj Aug. 15, 2016, 5:04 a.m. UTC
Fix below  build with musl while here

| ../../udisks-2.1.7/udisks/udisksclient.c:2004:6: warning: '__GNUC_PREREQ' is not defined, evaluates to 0 [-Wundef]
| # if __GNUC_PREREQ(4,6) || __clang__

Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 .../udisks/udisks2/non-gnu-libc.patch              | 26 ++++++++++++++++++++++
 .../udisks/{udisks2_2.1.5.bb => udisks2_2.1.7.bb}  |  8 ++++---
 2 files changed, 31 insertions(+), 3 deletions(-)
 create mode 100644 meta-oe/recipes-support/udisks/udisks2/non-gnu-libc.patch
 rename meta-oe/recipes-support/udisks/{udisks2_2.1.5.bb => udisks2_2.1.7.bb} (84%)

-- 
2.9.3

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
diff mbox

Patch

diff --git a/meta-oe/recipes-support/udisks/udisks2/non-gnu-libc.patch b/meta-oe/recipes-support/udisks/udisks2/non-gnu-libc.patch
new file mode 100644
index 0000000..98e6c75
--- /dev/null
+++ b/meta-oe/recipes-support/udisks/udisks2/non-gnu-libc.patch
@@ -0,0 +1,26 @@ 
+musl does not define __GNUC_PREREQ therefore check for C library being glibc
+if not then define the macro
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Index: udisks-2.1.7/udisks/udisksclient.c
+===================================================================
+--- udisks-2.1.7.orig/udisks/udisksclient.c
++++ udisks-2.1.7/udisks/udisksclient.c
+@@ -27,8 +27,15 @@
+ #include "udisksobjectinfo.h"
+ 
+ /* For __GNUC_PREREQ usage below */
+-#ifdef __GNUC__
++#ifdef __GLIBC__
+ # include <features.h>
++#else
++#if defined(__GNUC__)
++#define	__GNUC_PREREQ(__maj, __min)	\
++	(__GNUC__ > (__maj) || __GNUC__ == (__maj) && __GNUC_MINOR__ >= (__min))
++#else
++#define	__GNUC_PREREQ(__maj, __min) 0
++#endif
+ #endif
+ 
+ /**
diff --git a/meta-oe/recipes-support/udisks/udisks2_2.1.5.bb b/meta-oe/recipes-support/udisks/udisks2_2.1.7.bb
similarity index 84%
rename from meta-oe/recipes-support/udisks/udisks2_2.1.5.bb
rename to meta-oe/recipes-support/udisks/udisks2_2.1.7.bb
index f365cfa..34762dd 100644
--- a/meta-oe/recipes-support/udisks/udisks2_2.1.5.bb
+++ b/meta-oe/recipes-support/udisks/udisks2_2.1.7.bb
@@ -7,9 +7,11 @@  DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)
 
 RDEPENDS_${PN} = "acl"
 
-SRC_URI = "http://udisks.freedesktop.org/releases/udisks-${PV}.tar.bz2"
-SRC_URI[md5sum] = "73632501002e6de8244f831e38b2b98e"
-SRC_URI[sha256sum] = "2cfcf560447ea44cba2a683342c7062aaaf35e4eb554bed64ac2dd55a70a5fb6"
+SRC_URI = "http://udisks.freedesktop.org/releases/udisks-${PV}.tar.bz2 \
+           file://non-gnu-libc.patch \
+"
+SRC_URI[md5sum] = "8bccd36573b75286538bd5bd2c424f45"
+SRC_URI[sha256sum] = "abae2bb3bdc691ca13c1e4c244630b8c881c4f3b35c207299f1b39b7bec83785"
 
 inherit autotools systemd gtk-doc gobject-introspection