From 9a3d53fad062cdadb4df81f6998a5e09336c637b Mon Sep 17 00:00:00 2001 From: Shih-wei Liao Date: Mon, 6 Aug 2012 09:50:56 -0700 Subject: [PATCH] When compiling with clang, don't "fortify_source" the strlen. At this point, FORTIFY_SOURCE and clang are just plain incompatible. Need to solve the underlying incompatibility first. Change-Id: I3366477d19461e1ec93b1c30e0c7e8145b391b9b --- libc/include/string.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libc/include/string.h b/libc/include/string.h index 8e472e7c0..5259c15ec 100644 --- a/libc/include/string.h +++ b/libc/include/string.h @@ -208,6 +208,7 @@ size_t strlcat(char *dest, const char *src, size_t size) { return __strlcat_chk(dest, src, size, bos); } +#if !defined(__clang__) __purefunc extern size_t __strlen_real(const char *) __asm__(__USER_LABEL_PREFIX__ "strlen"); extern size_t __strlen_chk(const char *, size_t); @@ -223,6 +224,7 @@ size_t strlen(const char *s) { return __strlen_chk(s, bos); } +#endif /* !defined(__clang__) */ #endif /* defined(__BIONIC_FORTIFY_INLINE) */