aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/socketcan/libsocketcan
diff options
context:
space:
mode:
authorEric BENARD <eric@eukrea.com>2013-09-19 20:56:21 +0000
committerMartin Jansa <Martin.Jansa@gmail.com>2013-10-05 12:36:02 +0200
commit8b9fccbbfaf757844f813b06a22c413dc5cafe94 (patch)
treeeb84fcd3d9208974cd4d2b27b0039b4d22031441 /meta-oe/recipes-extended/socketcan/libsocketcan
parent13f540c5a98d3a64b41117db9cf554956eebafe9 (diff)
downloadmeta-openembedded-contrib-8b9fccbbfaf757844f813b06a22c413dc5cafe94.tar.gz
libsocketcan: upgrade to 0.0.9
and include a compile fix Signed-off-by: Eric BĂ©nard <eric@eukrea.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended/socketcan/libsocketcan')
-rw-r--r--meta-oe/recipes-extended/socketcan/libsocketcan/0001-Use-strcmp-instead-of-sizeof-on-char-string.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/socketcan/libsocketcan/0001-Use-strcmp-instead-of-sizeof-on-char-string.patch b/meta-oe/recipes-extended/socketcan/libsocketcan/0001-Use-strcmp-instead-of-sizeof-on-char-string.patch
new file mode 100644
index 0000000000..aa6196ee90
--- /dev/null
+++ b/meta-oe/recipes-extended/socketcan/libsocketcan/0001-Use-strcmp-instead-of-sizeof-on-char-string.patch
@@ -0,0 +1,39 @@
+From 94094cc4ee7ae585da3e5e7e83e7d82b5d6de656 Mon Sep 17 00:00:00 2001
+From: Alexander Stein <alexander.stein@systec-electronic.com>
+Date: Wed, 14 Nov 2012 12:13:06 +0100
+Subject: [PATCH] Use strcmp instead of sizeof on char* string
+
+This bug was detected by the clang warning:
+libsocketcan.c:384:16: warning: argument to 'sizeof' in 'strncmp' call
+is the same expression as the source; did you mean to provide an
+explicit length? [-Wsizeof-pointer-memaccess]
+sizeof(name)) != 0)
+~~~~~~~^~~~~~
+
+Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+---
+Upstream-Status: Backport
+
+ src/libsocketcan.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/src/libsocketcan.c b/src/libsocketcan.c
+index fedcbdc..841c2ed 100644
+--- a/src/libsocketcan.c
++++ b/src/libsocketcan.c
+@@ -379,9 +379,8 @@ static int do_get_nl_link(int fd, __u8 acquire, const char *name, void *res)
+ nl_msg->nlmsg_len - NLMSG_LENGTH(sizeof(struct ifaddrmsg));
+ parse_rtattr(tb, IFLA_MAX, IFLA_RTA(ifi), len);
+
+- if (strncmp
+- ((char *)RTA_DATA(tb[IFLA_IFNAME]), name,
+- sizeof(name)) != 0)
++ if (strcmp
++ ((char *)RTA_DATA(tb[IFLA_IFNAME]), name) != 0)
+ continue;
+
+ if (tb[IFLA_LINKINFO])
+--
+1.8.3.1
+