diff --git a/libc/include/stdio.h b/libc/include/stdio.h index c2f6d84a8..03effcd04 100644 --- a/libc/include/stdio.h +++ b/libc/include/stdio.h @@ -156,11 +156,9 @@ char* gets(char*) __attribute__((deprecated("gets is unsafe, use fgets instead") 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 eb8ff211f..4d1e34c2e 100644 --- a/libc/include/sys/cdefs.h +++ b/libc/include/sys/cdefs.h @@ -332,4 +332,17 @@ int __size_mul_overflow(__SIZE_TYPE__ a, __SIZE_TYPE__ b, __SIZE_TYPE__ *result) } #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_ */