Merge changes I0262eed9,Iba9ee03a
* changes:
Add a temporary hack to work around __NDK_FPABI__.
Remove _GNU_SOURCE guard on tmpnam.
diff --git a/libc/include/stdio.h b/libc/include/stdio.h
index c2f6d84..03effcd 100644
--- a/libc/include/stdio.h
+++ b/libc/include/stdio.h
@@ -156,11 +156,9 @@
int sprintf(char* __restrict, const char* __restrict _Nonnull, ...) __printflike(2, 3);
int vsprintf(char* __restrict, const char* __restrict _Nonnull, __va_list) __printflike(2, 0);
char* tmpnam(char*) __attribute__((deprecated("tmpnam is unsafe, use mkstemp or tmpfile instead")));
-#if defined(__USE_BSD) || defined(__USE_GNU)
#define P_tmpdir "/tmp/" /* deprecated */
char* tempnam(const char*, const char*)
__attribute__((deprecated("tempnam is unsafe, use mkstemp or tmpfile instead")));
-#endif
int rename(const char*, const char*);
int renameat(int, const char*, int, const char*);
diff --git a/libc/include/sys/cdefs.h b/libc/include/sys/cdefs.h
index eb8ff21..4d1e34c 100644
--- a/libc/include/sys/cdefs.h
+++ b/libc/include/sys/cdefs.h
@@ -332,4 +332,17 @@
}
#endif
+/*
+ * TODO(danalbert): Remove this once we've moved entirely off prebuilts/ndk.
+ *
+ * The NDK used to have a __NDK_FPABI__ that was defined to empty for most cases
+ * but `__attribute__((pcs("aapcs")))` for the now defunct armeabi-v7a-hard ABI.
+ *
+ * During the transition from prebuilts/ndk to ndk_headers, we'll have some
+ * headers that still use __NDK_FPABI__ while the libc headers have stopped
+ * defining it. In the interim, just provide an empty definition to keep the
+ * build working.
+ */
+#define __NDK_FPABI__
+
#endif /* !_SYS_CDEFS_H_ */