diff options
author | Elliott Hughes <enh@google.com> | 2014-08-19 16:48:43 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-08-19 02:44:29 +0000 |
commit | e4fcc3ad2b2965858571f5fb7d485ceb7e4a8266 (patch) | |
tree | 2fc3e0a2bbc501f28c1a51437cef87294b317b73 | |
parent | 8a76ee821e49a912d1777fbe83b1ab07c1da541a (diff) | |
parent | b81046202842427a7e894a6bcb357971332997b0 (diff) | |
download | android_bionic-e4fcc3ad2b2965858571f5fb7d485ceb7e4a8266.tar.gz android_bionic-e4fcc3ad2b2965858571f5fb7d485ceb7e4a8266.tar.bz2 android_bionic-e4fcc3ad2b2965858571f5fb7d485ceb7e4a8266.zip |
Merge "Fix _BSD_SOURCE/__USE_BSD."
-rw-r--r-- | libc/include/sys/stat.h | 2 | ||||
-rw-r--r-- | libc/upstream-freebsd/android/include/freebsd-compat.h | 2 | ||||
-rw-r--r-- | libc/upstream-netbsd/android/include/netbsd-compat.h | 6 | ||||
-rw-r--r-- | libc/upstream-openbsd/android/include/openbsd-compat.h | 4 |
4 files changed, 8 insertions, 6 deletions
diff --git a/libc/include/sys/stat.h b/libc/include/sys/stat.h index a6cc368cf..d6044aedc 100644 --- a/libc/include/sys/stat.h +++ b/libc/include/sys/stat.h @@ -25,9 +25,11 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ + #ifndef _SYS_STAT_H_ #define _SYS_STAT_H_ +#include <features.h> #include <sys/cdefs.h> #include <sys/types.h> #include <sys/time.h> diff --git a/libc/upstream-freebsd/android/include/freebsd-compat.h b/libc/upstream-freebsd/android/include/freebsd-compat.h index d5f14258e..b44b94a8a 100644 --- a/libc/upstream-freebsd/android/include/freebsd-compat.h +++ b/libc/upstream-freebsd/android/include/freebsd-compat.h @@ -17,7 +17,7 @@ #ifndef _BIONIC_FREEBSD_COMPAT_H_included #define _BIONIC_FREEBSD_COMPAT_H_included -#define __USE_BSD +#define _BSD_SOURCE #define REPLACE_GETOPT /* diff --git a/libc/upstream-netbsd/android/include/netbsd-compat.h b/libc/upstream-netbsd/android/include/netbsd-compat.h index 84be93194..04bc728b5 100644 --- a/libc/upstream-netbsd/android/include/netbsd-compat.h +++ b/libc/upstream-netbsd/android/include/netbsd-compat.h @@ -17,6 +17,9 @@ #ifndef _BIONIC_NETBSD_COMPAT_H_included #define _BIONIC_NETBSD_COMPAT_H_included +#define _BSD_SOURCE +#define _GNU_SOURCE + // NetBSD uses _DIAGASSERT to null-check arguments and the like. #include <assert.h> #define _DIAGASSERT(e) ((e) ? (void) 0 : __assert2(__FILE__, __LINE__, __func__, #e)) @@ -24,9 +27,6 @@ // TODO: update our <sys/cdefs.h> to support this properly. #define __type_fit(t, a) (0 == 0) -#define _GNU_SOURCE -#define __USE_BSD - // TODO: we don't yet have thread-safe environment variables. #define __readlockenv() 0 #define __unlockenv() 0 diff --git a/libc/upstream-openbsd/android/include/openbsd-compat.h b/libc/upstream-openbsd/android/include/openbsd-compat.h index 34ad2c5c8..488b5f95b 100644 --- a/libc/upstream-openbsd/android/include/openbsd-compat.h +++ b/libc/upstream-openbsd/android/include/openbsd-compat.h @@ -17,11 +17,11 @@ #ifndef _BIONIC_OPENBSD_COMPAT_H_included #define _BIONIC_OPENBSD_COMPAT_H_included +#define _BSD_SOURCE + #include <sys/cdefs.h> #include <stddef.h> // For size_t. -#define __USE_BSD - /* OpenBSD's <ctype.h> uses these names, which conflicted with stlport. * Additionally, we changed the numeric/digit type from N to D for libcxx. */ |