diff --git a/libc/include/fcntl.h b/libc/include/fcntl.h index 77c92be7c..7ab720542 100644 --- a/libc/include/fcntl.h +++ b/libc/include/fcntl.h @@ -51,14 +51,6 @@ extern int creat(const char* path, mode_t mode); #if defined(__BIONIC_FORTIFY_INLINE) -# if !defined(__clang__) -/* - * Clang doesn't have support for __builtin_va_arg_pack() - * and __builtin_va_arg_pack_len() - * - * http://clang.llvm.org/docs/UsersManual.html#c_unimpl_gcc - */ - extern void __creat_error() __attribute__((__error__ ("called with O_CREAT, but missing mode"))); extern void __too_many_args_error() @@ -109,7 +101,6 @@ int openat(int dirfd, const char *pathname, int flags, ...) { return __openat_real(dirfd, pathname, flags, __builtin_va_arg_pack()); } -#endif /* !defined(__clang__) */ #endif /* defined(__BIONIC_FORTIFY_INLINE) */ __END_DECLS diff --git a/libc/include/stdio.h b/libc/include/stdio.h index 453cf0b94..8b95663f4 100644 --- a/libc/include/stdio.h +++ b/libc/include/stdio.h @@ -500,13 +500,6 @@ int vsprintf(char *dest, const char *format, __va_list ap) __builtin_object_size(dest, 0), format, ap); } - -# if !defined(__clang__) -/* - * Clang doesn't have support for __builtin_va_arg_pack() - * http://clang.llvm.org/docs/UsersManual.html#c_unimpl_gcc - */ - __BIONIC_FORTIFY_INLINE __attribute__((__format__ (printf, 3, 4))) __attribute__((__nonnull__ (3))) @@ -525,8 +518,6 @@ int sprintf(char *dest, const char *format, ...) __builtin_object_size(dest, 0), format, __builtin_va_arg_pack()); } -# endif /* !defined(__clang__) */ - extern char *__fgets_real(char *, int, FILE *) __asm__(__USER_LABEL_PREFIX__ "fgets"); extern void __fgets_too_big_error() diff --git a/libc/include/string.h b/libc/include/string.h index d1dc4c41b..06e22841b 100644 --- a/libc/include/string.h +++ b/libc/include/string.h @@ -147,7 +147,6 @@ void *memset (void *s, int c, size_t n) { return __builtin___memset_chk(s, c, n, __builtin_object_size (s, 0)); } -#if !defined(__clang__) extern size_t __strlcpy_real(char *, const char *, size_t) __asm__(__USER_LABEL_PREFIX__ "strlcpy"); extern void __strlcpy_error() @@ -224,8 +223,6 @@ size_t strlen(const char *s) { return __strlen_chk(s, bos); } -#endif /* !defined(__clang__) */ - #endif /* defined(__BIONIC_FORTIFY_INLINE) */ diff --git a/libc/include/sys/cdefs.h b/libc/include/sys/cdefs.h index 987a5e3db..ca81cb666 100644 --- a/libc/include/sys/cdefs.h +++ b/libc/include/sys/cdefs.h @@ -501,7 +501,7 @@ #define __BIONIC__ 1 #include -#if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 && defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 +#if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 && defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 && !defined(__clang__) #define __BIONIC_FORTIFY_INLINE \ extern inline \ __attribute__ ((always_inline)) \