am 65163750: am c37dd599: Merge "Fix builds where _FORTIFY_SOURCE is off."

* commit '65163750b11c814d6a75940ab1ede1e907b14d81':
  Fix builds where _FORTIFY_SOURCE is off.
diff --git a/libc/include/fcntl.h b/libc/include/fcntl.h
index 7ab7205..de2e3e3 100644
--- a/libc/include/fcntl.h
+++ b/libc/include/fcntl.h
@@ -49,7 +49,7 @@
 extern int  fcntl(int   fd, int   command, ...);
 extern int  creat(const char*  path, mode_t  mode);
 
-#if defined(__BIONIC_FORTIFY_INLINE)
+#if defined(__BIONIC_FORTIFY)
 
 extern void __creat_error()
     __attribute__((__error__ ("called with O_CREAT, but missing mode")));
@@ -101,7 +101,7 @@
     return __openat_real(dirfd, pathname, flags, __builtin_va_arg_pack());
 }
 
-#endif /* defined(__BIONIC_FORTIFY_INLINE) */
+#endif /* defined(__BIONIC_FORTIFY) */
 
 __END_DECLS
 
diff --git a/libc/include/stdio.h b/libc/include/stdio.h
index 62882db..fdf747d 100644
--- a/libc/include/stdio.h
+++ b/libc/include/stdio.h
@@ -457,7 +457,7 @@
 __END_DECLS
 #endif /* _GNU_SOURCE */
 
-#if defined(__BIONIC_FORTIFY_INLINE)
+#if defined(__BIONIC_FORTIFY)
 
 __BEGIN_DECLS
 
@@ -538,6 +538,6 @@
 
 __END_DECLS
 
-#endif /* defined(__BIONIC_FORTIFY_INLINE) */
+#endif /* defined(__BIONIC_FORTIFY) */
 
 #endif /* _STDIO_H_ */
diff --git a/libc/include/string.h b/libc/include/string.h
index 63e768e..56d89a4 100644
--- a/libc/include/string.h
+++ b/libc/include/string.h
@@ -84,7 +84,7 @@
 extern int    strcoll(const char *, const char *) __purefunc;
 extern size_t strxfrm(char *, const char *, size_t);
 
-#if defined(__BIONIC_FORTIFY_INLINE)
+#if defined(__BIONIC_FORTIFY)
 
 extern void __memcpy_dest_size_error()
     __attribute__((__error__("memcpy called with size bigger than destination")));
@@ -258,7 +258,7 @@
 }
 
 
-#endif /* defined(__BIONIC_FORTIFY_INLINE) */
+#endif /* defined(__BIONIC_FORTIFY) */
 
 __END_DECLS
 
diff --git a/libc/include/strings.h b/libc/include/strings.h
index 0ee691d..e72798b 100644
--- a/libc/include/strings.h
+++ b/libc/include/strings.h
@@ -50,12 +50,12 @@
 int	 strcasecmp(const char *, const char *);
 int	 strncasecmp(const char *, const char *, size_t);
 
-#if defined(__BIONIC_FORTIFY_INLINE)
+#if defined(__BIONIC_FORTIFY)
 __BIONIC_FORTIFY_INLINE
 void bzero (void *s, size_t n) {
     __builtin___memset_chk(s, '\0', n, __builtin_object_size (s, 0));
 }
-#endif /* defined(__BIONIC_FORTIFY_INLINE) */
+#endif /* defined(__BIONIC_FORTIFY) */
 
 __END_DECLS
 
diff --git a/libc/include/sys/cdefs.h b/libc/include/sys/cdefs.h
index 3617aba..1976d6a 100644
--- a/libc/include/sys/cdefs.h
+++ b/libc/include/sys/cdefs.h
@@ -516,13 +516,14 @@
 #include <android/api-level.h>
 
 #if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 && defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 && !defined(__clang__)
+#define __BIONIC_FORTIFY 1
 #define __BIONIC_FORTIFY_INLINE \
     extern inline \
     __attribute__ ((always_inline)) \
     __attribute__ ((gnu_inline)) \
     __attribute__ ((artificial))
-#define __BIONIC_FORTIFY_UNKNOWN_SIZE ((size_t) -1)
 #endif
+#define __BIONIC_FORTIFY_UNKNOWN_SIZE ((size_t) -1)
 
 /* Android-added: for FreeBSD's libm. */
 #define __weak_reference(sym,alias) \
diff --git a/libc/include/sys/stat.h b/libc/include/sys/stat.h
index 05b221f..4e8beb6 100644
--- a/libc/include/sys/stat.h
+++ b/libc/include/sys/stat.h
@@ -129,7 +129,7 @@
 extern int    mknod(const char *, mode_t, dev_t);
 extern mode_t umask(mode_t);
 
-#if defined(__BIONIC_FORTIFY_INLINE)
+#if defined(__BIONIC_FORTIFY)
 
 extern mode_t __umask_chk(mode_t);
 extern mode_t __umask_real(mode_t)
@@ -147,7 +147,7 @@
   }
   return __umask_chk(mode);
 }
-#endif /* defined(__BIONIC_FORTIFY_INLINE) */
+#endif /* defined(__BIONIC_FORTIFY) */
 
 
 #define  stat64    stat