Use strlen when searching for a nul char
Commit Message
@@ -60,13 +60,25 @@
 #ifndef _HAVE_STRING_ARCH_strchr
 extern void *__rawmemchr (const void *__s, int __c);
-#Â define strchr(s, c) \
+# define strchr(s, c) \
  (__extension__ (__builtin_constant_p (c) && !__builtin_constant_p (s)             \
                 && (c) == '\0'                                             \
                 ? (char *) __rawmemchr (s, c)                              \
                 : __builtin_strchr (s, c)))
 #endif
+#ifndef _HAVE_STRING_ARCH_rawmemchr
+extern void *__rawmemchr (const void *__s, int __c);
+# define __rawmemchr(s, c) \
+Â Â Â (__extension__ ({ char *__s = (char *)(s);Â Â Â Â Â Â Â Â \
+Â Â Â Â Â __builtin_constant_p (c) && (c) == '\0'Â Â Â Â Â Â Â Â Â \
+Â Â Â Â Â ? (void *)(__s + strlen (__s))Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â \
+Â Â Â Â Â : __rawmemchr (__s, (c));}))
+# ifdef __USE_GNU
+#Â define rawmemchr(s,c) __rawmemchr ((s), (c))
+# endif
+#endif
+
 /* Copy SRC to DEST, returning pointer to final NUL byte. */
 #ifdef __USE_GNU