[oe] patch for acpid-1.0.10, building for i586-generic on x86_64

Christian Betz christian.betz at gmail.com
Sat May 14 14:25:53 UTC 2011


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

--- 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;
 +      }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: netlink.diff.diff
Type: text/x-patch
Size: 631 bytes
Desc: not available
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20110514/3482e56c/attachment-0002.bin>


More information about the Openembedded-devel mailing list