aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xndk/checkbuild.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/ndk/checkbuild.py b/ndk/checkbuild.py
index 2aa91b4d4..5e6cf7a76 100755
--- a/ndk/checkbuild.py
+++ b/ndk/checkbuild.py
@@ -1673,8 +1673,13 @@ class Sysroot(ndk.builds.Module):
build = '0'
ndk_version_h.write(textwrap.dedent("""\
- #ifndef ANDROID_NDK_VERSION_H
- #define ANDROID_NDK_VERSION_H
+ #pragma once
+
+ /**
+ * Set to 1 if this is an NDK, unset otherwise. See
+ * https://android.googlesource.com/platform/bionic/+/master/docs/defines.md.
+ */
+ #define __ANDROID_NDK__ 1
/**
* Major version of this NDK.
@@ -1707,8 +1712,6 @@ class Sysroot(ndk.builds.Module):
* Set to 1 if this is a canary build, 0 if not.
*/
#define __NDK_CANARY__ {canary}
-
- #endif /* ANDROID_NDK_VERSION_H */
""".format(
major=major,
minor=minor,