From 3c4b50fd8cce143d9ba8f03a93f0fccba4e54d14 Mon Sep 17 00:00:00 2001 From: Pavel Chupin Date: Fri, 26 Jul 2013 16:50:11 +0400 Subject: [PATCH] Fix strchr for basic non-sse case on x86 Fix source location. Move declaration of __strchr_chk out of ifdef __BIONIC_FORTIFY which should be available for strchr.cpp compilation when __BIONIC_FORTIFY is not defined. Change-Id: I552a6e16656e59b276b322886cfbf57bbfb2e6a7 Signed-off-by: Pavel Chupin --- libc/arch-x86/x86.mk | 2 +- libc/include/string.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libc/arch-x86/x86.mk b/libc/arch-x86/x86.mk index 19c14023a..ada5d6987 100644 --- a/libc/arch-x86/x86.mk +++ b/libc/arch-x86/x86.mk @@ -72,7 +72,7 @@ _LIBC_ARCH_COMMON_SRC_FILES += \ arch-x86/string/bzero.S \ bionic/memrchr.c \ bionic/memchr.c \ - string/strchr.cpp \ + bionic/strchr.cpp \ string/strrchr.c \ string/index.c \ bionic/strnlen.c \ diff --git a/libc/include/string.h b/libc/include/string.h index f6b4acf86..10ff72230 100644 --- a/libc/include/string.h +++ b/libc/include/string.h @@ -46,6 +46,8 @@ extern void memswap(void *, void *, size_t); extern char* index(const char *, int) __purefunc; extern char* strchr(const char *, int) __purefunc; +extern char* __strchr_chk(const char *, int, size_t); + extern char* strrchr(const char *, int) __purefunc; extern size_t strlen(const char *) __purefunc; @@ -238,8 +240,6 @@ size_t strlen(const char *s) { return __strlen_chk(s, bos); } -extern char* __strchr_chk(const char *, int, size_t); - __BIONIC_FORTIFY_INLINE char* strchr(const char *s, int c) { size_t bos = __bos(s);