| Submitter | Christian Betz |
|---|---|
| Date | May 14, 2011, 2:25 p.m. |
| Message ID | <BANLkTikVtDGTO=04H8kkPdJLH2UtN9JR2A@mail.gmail.com> |
| Download | mbox | patch |
| Permalink | /patch/4023/ |
| State | Superseded |
| Headers | show |
Comments
Dear Christian, thank you for your patch. Am Samstag, den 14.05.2011, 10:25 -0400 schrieb Christian Betz: > 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; > + } Could you please resend the patch adhering to the commit policy, e. g. your Signed-off-by line is missing, and formatted such away, that we can use `git am` to apply it. You should use `git format-patch` and for example `git send-email`. If you have a little more time, could you figure out if those patches have been sent upstream and if not send them upstream if needed. That would be awesome. Thanks, Paul [1] http://openembedded.org/index.php/Commit_Policy
Thanks for the tip! I will investigate getting this upstream. However, I may need some guidance figuring out where upstream is. acpid itself seems to be either extremely stable or unmaintained (nothing in a very long time on the sourceforge page). the patch in oe is simply called netlink.diff. Google lead me here where you can download a tarball of a modified acpid-1.0.10: http://www.tedfelix.com/linux/acpid-netlink.html however, no patches are provided. there is a launchpad page which documents that ubuntu seems to be creating patches from acpid-netlink https://launchpad.net/ubuntu/+source/acpid/1.0.10-4 My best guess is that upstream is actually acpid-netlink. I will try to make contact. The real question which involves deeper investigation is why oe doesn't just pull directly from acpid-netlink (i.e. is netlink.diff just cherry picked changes from acpid-netlink?). I never considered how difficult it can be to find upstream! Christian
Patch
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; + }