From patchwork Mon May 16 10:21:24 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2/3] acpid: Make 1.0.10 compile. Date: Mon, 16 May 2011 10:21:24 -0000 From: =?utf-8?b?U8O4cmVuIEhvbG0gPHNnaEBzZ2guZGs+?= X-Patchwork-Id: 4107 Message-Id: <1305541284-18178-1-git-send-email-sgh@sgh.dk> To: openembedded-devel@lists.openembedded.org Patch is tested on i686. Compilation failed with the following error : | i686-angstrom-linux-gcc -march=pentiumpro --sysroot=/home/sgh/oe-new-oe/build-vmc16/tmp/sysroots/i686-angstrom-linux -W -Wall -Werror -Wundef -Wshadow -D_GNU_SOURCE -O2 -g -DVERSION="\"1.0.10\"" -c -o sock.o sock.c | cc1: warnings being treated as errors | libnetlink.c: In function 'addraw_l': | libnetlink.c:521:56: error: comparison between signed and unsigned integer expressions --- recipes/acpid/acpid-1.0.10/libnetlink.diff | 15 +++++++++++++++ recipes/acpid/acpid_1.0.10.bb | 1 + 2 files changed, 16 insertions(+), 0 deletions(-) create mode 100644 recipes/acpid/acpid-1.0.10/libnetlink.diff diff --git a/recipes/acpid/acpid-1.0.10/libnetlink.diff b/recipes/acpid/acpid-1.0.10/libnetlink.diff new file mode 100644 index 0000000..59ab951 --- /dev/null +++ b/recipes/acpid/acpid-1.0.10/libnetlink.diff @@ -0,0 +1,15 @@ +diff --git a/libnetlink.c b/libnetlink.c +index 6f1ceea..d34dfe4 100644 +--- a/libnetlink.c ++++ b/libnetlink.c +@@ -518,8 +518,8 @@ int addattr_l(struct nlmsghdr *n, int maxlen, int type, const void *data, + + int addraw_l(struct nlmsghdr *n, int maxlen, const void *data, int len) + { +- if ((int)NLMSG_ALIGN(n->nlmsg_len) + NLMSG_ALIGN(len) > maxlen) { +- fprintf(stderr, "addraw_l ERROR: message exceeded bound of %d\n",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.bb b/recipes/acpid/acpid_1.0.10.bb index 9d3170d..f0a6049 100644 --- a/recipes/acpid/acpid_1.0.10.bb +++ b/recipes/acpid/acpid_1.0.10.bb @@ -2,6 +2,7 @@ require acpid.inc SRC_URI_append = " file://event.c.diff \ file://netlink.diff \ + file://libnetlink.diff \ file://gcc44.diff \ file://acpid-sys-stat.patch \ "