[oe-commits] [meta-openembedded] 44/67: zlog: Fix build on 64bit targets and musl

git at git.openembedded.org git at git.openembedded.org
Wed Jul 19 12:51:48 UTC 2017


This is an automated email from the git hooks/post-receive script.

martin_jansa pushed a commit to branch master-next
in repository meta-openembedded.

commit ef74904a25748d0ec77498900c8ac968e1768bc4
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Mon Jul 17 20:10:03 2017 -0700

    zlog: Fix build on 64bit targets and musl
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
    Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
---
 ...t-pthread_t-to-unsigned-long-instead-of-u.patch | 32 ++++++++++++++++++++++
 meta-oe/recipes-extended/zlog/zlog_git.bb          |  4 ++-
 2 files changed, 35 insertions(+), 1 deletion(-)

diff --git a/meta-oe/recipes-extended/zlog/zlog/0001-event.c-Cast-pthread_t-to-unsigned-long-instead-of-u.patch b/meta-oe/recipes-extended/zlog/zlog/0001-event.c-Cast-pthread_t-to-unsigned-long-instead-of-u.patch
new file mode 100644
index 0000000..71a9891
--- /dev/null
+++ b/meta-oe/recipes-extended/zlog/zlog/0001-event.c-Cast-pthread_t-to-unsigned-long-instead-of-u.patch
@@ -0,0 +1,32 @@
+From b97f62fdf3b78eb5cfcb3a1b12c6fd62f735717b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Sat, 15 Jul 2017 09:29:33 -0700
+Subject: [PATCH] event.c: Cast pthread_t to unsigned long instead of unsigned
+ int
+
+On 64bit machines it ends up in errors
+
+event.c:85:67: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
+  a_event->tid_hex_str_len = sprintf(a_event->tid_hex_str, "0x%x", (unsigned int)a_event->tid);
+
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+ src/event.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/event.c b/src/event.c
+index 8f988b5..c632c33 100644
+--- a/src/event.c
++++ b/src/event.c
+@@ -82,7 +82,7 @@ zlog_event_t *zlog_event_new(int time_cache_count)
+ 	a_event->tid = pthread_self();
+ 
+ 	a_event->tid_str_len = sprintf(a_event->tid_str, "%lu", (unsigned long)a_event->tid);
+-	a_event->tid_hex_str_len = sprintf(a_event->tid_hex_str, "0x%x", (unsigned int)a_event->tid);
++	a_event->tid_hex_str_len = sprintf(a_event->tid_hex_str, "0x%lu", (unsigned long)a_event->tid);
+ 
+ 	//zlog_event_profile(a_event, ZC_DEBUG);
+ 	return a_event;
+-- 
+2.13.3
+
diff --git a/meta-oe/recipes-extended/zlog/zlog_git.bb b/meta-oe/recipes-extended/zlog/zlog_git.bb
index 51c746f..86e6d30 100644
--- a/meta-oe/recipes-extended/zlog/zlog_git.bb
+++ b/meta-oe/recipes-extended/zlog/zlog_git.bb
@@ -6,7 +6,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
 PV = "1.2.12+git${SRCPV}"
 
 SRCREV = "13904dab2878aa2654d0c20fb8600a3dc5f2dd68"
-SRC_URI = "git://github.com/HardySimpson/zlog"
+SRC_URI = "git://github.com/HardySimpson/zlog \
+           file://0001-event.c-Cast-pthread_t-to-unsigned-long-instead-of-u.patch \
+           "
 
 S = "${WORKDIR}/git"
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list