Openembedded Devel Discussions
 help / color / mirror / Atom feed
From: Khem Raj <raj.khem@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: [PATCH 2/4] collectd: Backport fix build with newer gcc
Date: Sun,  1 Mar 2015 22:25:06 +0000	[thread overview]
Message-ID: <1425248708-4076-2-git-send-email-raj.khem@gmail.com> (raw)
In-Reply-To: <1425248708-4076-1-git-send-email-raj.khem@gmail.com>

on mips we get the errors of type mismatch

Change-Id: Ib7b3bd243417d1ba77e8167daf761fd4a2fc2e64
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...ure-size_t-portability-in-DEBUG-statement.patch | 30 ++++++++++++++++++++++
 .../recipes-extended/collectd/collectd_5.4.1.bb    |  1 +
 2 files changed, 31 insertions(+)
 create mode 100644 meta-oe/recipes-extended/collectd/collectd/0001-netlink-ensure-size_t-portability-in-DEBUG-statement.patch

diff --git a/meta-oe/recipes-extended/collectd/collectd/0001-netlink-ensure-size_t-portability-in-DEBUG-statement.patch b/meta-oe/recipes-extended/collectd/collectd/0001-netlink-ensure-size_t-portability-in-DEBUG-statement.patch
new file mode 100644
index 0000000..52b9a86
--- /dev/null
+++ b/meta-oe/recipes-extended/collectd/collectd/0001-netlink-ensure-size_t-portability-in-DEBUG-statement.patch
@@ -0,0 +1,30 @@
+From f6c89c17955223bf8c99a901ca6f901b83fa521f Mon Sep 17 00:00:00 2001
+From: Marc Fournier <marc.fournier@camptocamp.com>
+Date: Wed, 3 Dec 2014 16:15:28 +0100
+Subject: [PATCH] netlink: ensure size_t portability in DEBUG() statement
+
+This prevents the following error when building on 32bit systems with
+gcc 4.7.2:
+
+netlink.c: In function 'ir_read':
+netlink.c:783:7: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'size_t' [-Werror=format]
+---
+ src/netlink.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/netlink.c b/src/netlink.c
+index 422dc8c..3c4642c 100644
+--- a/src/netlink.c
++++ b/src/netlink.c
+@@ -683,7 +683,7 @@ static int ir_read (void)
+         continue;
+       }
+ 
+-      DEBUG ("netlink plugin: ir_read: querying %s from %s (%lu).",
++      DEBUG ("netlink plugin: ir_read: querying %s from %s (%zu).",
+           type_name[type_index], iflist[ifindex], ifindex);
+ 
+       nlh = mnl_nlmsg_put_header (buf);
+-- 
+2.1.4
+
diff --git a/meta-oe/recipes-extended/collectd/collectd_5.4.1.bb b/meta-oe/recipes-extended/collectd/collectd_5.4.1.bb
index 92b231c..6e40076 100644
--- a/meta-oe/recipes-extended/collectd/collectd_5.4.1.bb
+++ b/meta-oe/recipes-extended/collectd/collectd_5.4.1.bb
@@ -9,6 +9,7 @@ SRC_URI = "http://collectd.org/files/collectd-${PV}.tar.bz2 \
            file://no-gcrypt-badpath.patch \
            file://collectd-version.patch \
            file://glibc-2.20-compatiblity.patch \
+           file://0001-netlink-ensure-size_t-portability-in-DEBUG-statement.patch \
            file://collectd.init \
            file://collectd.service"
 SRC_URI[md5sum] = "6f56c71c96573a7f4f7fb3bfab185974"
-- 
2.1.4



  reply	other threads:[~2015-03-01 22:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-01 22:25 [PATCH 1/4] soci: Add recipe Khem Raj
2015-03-01 22:25 ` Khem Raj [this message]
2015-03-01 22:25 ` [PATCH 3/4] v4l-utils: RPROVIDE media-ctl Khem Raj
2015-03-01 22:25 ` [PATCH 4/4] lirc: Add recipe for 0.9.2 Khem Raj
2015-03-02  7:59 ` [PATCH 1/4] soci: Add recipe Martin Jansa
2015-03-02 10:28 ` Koen Kooi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1425248708-4076-2-git-send-email-raj.khem@gmail.com \
    --to=raj.khem@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox