summaryrefslogtreecommitdiff
path: root/tests/zerosize-ptr.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2018-07-08 23:15:22 +0200
committerJörg Frings-Fürst <debian@jff.email>2018-07-08 23:15:22 +0200
commit853c9cf3718db7c9f6d723e45031016231e1cbd1 (patch)
treee6a5cafe819de3d14665da32bfd87259b089ec02 /tests/zerosize-ptr.h
parent7b350538dddb27a4513158cb6b6405b85f175ad1 (diff)
parent10bd216b0099d2ae8cb22c664fb725165096f95c (diff)
Merge branch 'release/debian/0.9.10-1'debian/0.9.10-1
Diffstat (limited to 'tests/zerosize-ptr.h')
-rw-r--r--tests/zerosize-ptr.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/zerosize-ptr.h b/tests/zerosize-ptr.h
index 9adecfaf..d5592c58 100644
--- a/tests/zerosize-ptr.h
+++ b/tests/zerosize-ptr.h
@@ -1,5 +1,5 @@
/* Return a pointer to a zero-size object in memory.
- Copyright (C) 2009-2017 Free Software Foundation, Inc.
+ Copyright (C) 2009-2018 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -18,6 +18,19 @@
argument. Therefore this file produces a non-NULL pointer which cannot
be dereferenced, if possible. */
+/* On Android, when targeting Android 4.4 or older with a GCC toolchain,
+ prevent a compilation error
+ "error: call to 'mmap' declared with attribute error: mmap is not
+ available with _FILE_OFFSET_BITS=64 when using GCC until android-21.
+ Either raise your minSdkVersion, disable _FILE_OFFSET_BITS=64, or
+ switch to Clang."
+ The files that we access in this compilation unit are less than 2 GB
+ large. */
+#if defined __ANDROID__
+# undef _FILE_OFFSET_BITS
+# undef __USE_FILE_OFFSET64
+#endif
+
#include <stdlib.h>
/* Test whether mmap() and mprotect() are available.