extern void __assert_fail_base (const char *fmt, const char *assertion,
const char *file, unsigned int line,
const char *function)
- __THROW __attribute__ ((__noreturn__));
+ __THROW __attribute__ ((__noreturn__)) attribute_hidden;
-# if IS_IN (libc) || IS_IN (rtld)
-hidden_proto (__assert_fail)
-hidden_proto (__assert_perror_fail)
+rtld_hidden_proto (__assert_fail)
+rtld_hidden_proto (__assert_perror_fail)
+libc_hidden_proto (__assert_perror_fail)
+
+
+# if IS_IN (libc)
+/* Redirect to the internal version which does not use stderr. */
+extern _Noreturn __typeof (__assert_fail) __libc_assert_fail attribute_hidden;
+# define __assert_fail __libc_assert_fail
# endif
#endif