From 7ea817d39ecfdb0f42a61ea87c81105461710a93 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Tue, 7 Jul 2015 09:22:32 -0700 Subject: [PATCH] Add some glibc-like #defines for libchrome. libchrome uses __USE_XOPEN2K8 to decide whether futimens is available. That's perhaps not the best idea, but there are other cases where we defined the same feature macros as glibc to aid portability. Change-Id: Ie6e04cb181d88698d618e7dbd26cd347a6bf076c --- libc/include/sys/cdefs.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libc/include/sys/cdefs.h b/libc/include/sys/cdefs.h index 04613f42f..7df8b6078 100644 --- a/libc/include/sys/cdefs.h +++ b/libc/include/sys/cdefs.h @@ -520,6 +520,11 @@ #include /* glibc compatibility. */ +#if __POSIX_VISIBLE >= 200809 +#define __USE_ISOC99 1 +#define __USE_XOPEN2K 1 +#define __USE_XOPEN2K8 1 +#endif #if __LP64__ #define __WORDSIZE 64 #else