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;
+ }
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;
+ }
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel