aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2007-10-08 09:43:02 +0200
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 16:55:19 -0700
commitd8b0fb51ef1563c631d26cb649a5479b5cc4899c (patch)
tree29276760231fa088dd96961a5bfdde1011163aa7
parent[PATCH] libertas: fix u8 constant (diff)
downloadlinux-dev-d8b0fb51ef1563c631d26cb649a5479b5cc4899c.tar.xz
linux-dev-d8b0fb51ef1563c631d26cb649a5479b5cc4899c.zip
[PATCH] libertas link error due to gcc `smartness'
Some versions of gcc replace strstr() calls with a single-character `needle' parameter by strchr() behind our back. This causes a link error if strchr() is defined as an inline function in <asm/string.h> (e.g. on m68k): | drivers/built-in.o: In function `libertas_parse_chan': | linux/drivers/net/wireless/libertas/debugfs.c:209: undefined reference to `strchr' | drivers/built-in.o: In function `libertas_parse_ssid': | linux/drivers/net/wireless/libertas/debugfs.c:260: undefined reference to `strchr' Avoid this by explicitly calling strchr() instead. Also include <linux/string.h>, because this file calls lots of str*() routines. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-By: Holger Schurig <hs4233@mail.mn-solutions.de> Acked-By: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/libertas/debugfs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/libertas/debugfs.c b/drivers/net/wireless/libertas/debugfs.c
index cb00b080409e..0bda0b511910 100644
--- a/drivers/net/wireless/libertas/debugfs.c
+++ b/drivers/net/wireless/libertas/debugfs.c
@@ -3,6 +3,7 @@
#include <linux/debugfs.h>
#include <linux/delay.h>
#include <linux/mm.h>
+#include <linux/string.h>
#include <net/iw_handler.h>
#include "dev.h"
@@ -205,7 +206,7 @@ static int libertas_parse_chan(char *buf, size_t count,
if (!start)
return -EINVAL;
start += 5;
- end = strstr(start, " ");
+ end = strchr(start, ' ');
if (!end)
end = buf + count;
hold = kzalloc((end - start)+1, GFP_KERNEL);
@@ -256,7 +257,7 @@ static void libertas_parse_ssid(char *buf, size_t count,
if (!hold)
return;
hold += 5;
- end = strstr(hold, " ");
+ end = strchr(hold, ' ');
if (!end)
end = buf + count - 1;