aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/tile
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@ezchip.com>2014-12-19 22:46:52 -0500
committerChris Metcalf <cmetcalf@ezchip.com>2014-12-19 22:54:35 -0500
commit95dee05f17563f737e5a34fde97bdc7fa02a5185 (patch)
treebb65a520fdc24a7b53efd45f96c3ff3b5176a507 /sysdeps/tile
parent0c73b4ea0c5cd6a82e7acace1ae6a6335ca02e2c (diff)
downloadglibc-95dee05f17563f737e5a34fde97bdc7fa02a5185.zip
glibc-95dee05f17563f737e5a34fde97bdc7fa02a5185.tar.gz
glibc-95dee05f17563f737e5a34fde97bdc7fa02a5185.tar.bz2
tilegx: fix strstr to build and link better
The two_way_short_needle() routine included from str-two-way.h is not used, so mark it so to avoid compiler warnings. Calling strnlen() breaks linknamespace tests, so change it to __strnlen().
Diffstat (limited to 'sysdeps/tile')
-rw-r--r--sysdeps/tile/tilegx/strstr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/tile/tilegx/strstr.c b/sysdeps/tile/tilegx/strstr.c
index 3e72789..d04f129 100644
--- a/sysdeps/tile/tilegx/strstr.c
+++ b/sysdeps/tile/tilegx/strstr.c
@@ -27,6 +27,7 @@
(!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l)) \
&& ((h_l) = (j) + (n_l)))
#include "str-two-way.h"
+typeof(two_way_short_needle) two_way_short_needle __attribute__((unused));
#undef strstr
@@ -238,7 +239,7 @@ STRSTR (const char *haystack_start, const char *needle_start)
}
/* Fail if NEEDLE is longer than HAYSTACK. */
- if (strnlen (haystack, needle_len) < needle_len)
+ if (__strnlen (haystack, needle_len) < needle_len)
return NULL;
/* Perform the search. Abstract memory is considered to be an array