From patchwork Sat May 14 14:25:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: patch for acpid-1.0.10, building for i586-generic on x86_64 Date: Sat, 14 May 2011 14:25:53 -0000 From: Christian Betz X-Patchwork-Id: 4023 Message-Id: To: openembedded-devel@lists.openembedded.org acpid-1.0.10 fails building due to a compiler warning: libnetlink.c:521:56: error: comparison between signed and unsigned integer expressions I noticed another user mentioning this issue not too long ago. I can't say whether the i586 machine type or x86_64 host is the issue, but the fix is easy: just add a missing cast. Christian ---- This is a patch to a patch since the entire libnetlink.c file is part of the existing netlink.diff patch + return -1; + } diff --git a/recipes/acpid/acpid-1.0.10/netlink.diff b/recipes/acpid/acpid-1.0.10/netlink.diff index 635c550..ebdec58 100644 --- a/recipes/acpid/acpid-1.0.10/netlink.diff +++ b/recipes/acpid/acpid-1.0.10/netlink.diff @@ -2019,7 +2019,7 @@ diff -ruN acpid-1.0.10/libnetlink.c acpid-1.0.10-netlink2/libnetlink.c + +int addraw_l(struct nlmsghdr *n, int maxlen, const void *data, int len) +{ -+ if ((int)NLMSG_ALIGN(n->nlmsg_len) + NLMSG_ALIGN(len) > maxlen) { ++ if ((int)NLMSG_ALIGN(n->nlmsg_len) + (int)NLMSG_ALIGN(len) > maxlen) { + fprintf(stderr, "addraw_l ERROR: message exceeded bound of %d\n",maxlen); + return -1; + }