Inline helpers need to be exported unmangled.
__open_2() is used by the fortify implementation of open(2) in
fcntl.h, and as such needs an unmangled C name. For some reason
(inlining?), this doesn't cause problems at the default optimization
level, but does for -O0.
The rest of these didn't cause build failures, but they look suspect
and probably will, we just haven't caught them yet.
Bug: 17784968
Change-Id: I7391a7a8999ee204eaf6abd14a3d5373ea419d5b
diff --git a/libc/include/sys/stat.h b/libc/include/sys/stat.h
index b56ffa4..77d7cac 100644
--- a/libc/include/sys/stat.h
+++ b/libc/include/sys/stat.h
@@ -160,12 +160,12 @@
extern int mknod(const char*, mode_t, dev_t);
extern mode_t umask(mode_t);
-#if defined(__BIONIC_FORTIFY)
-
extern mode_t __umask_chk(mode_t);
extern mode_t __umask_real(mode_t) __RENAME(umask);
__errordecl(__umask_invalid_mode, "umask called with invalid mode");
+#if defined(__BIONIC_FORTIFY)
+
__BIONIC_FORTIFY_INLINE
mode_t umask(mode_t mode) {
#if !defined(__clang__)