summaryrefslogtreecommitdiffhomepage
path: root/tunnel
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2023-03-22 14:26:39 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2023-03-22 15:02:54 +0100
commit4aa4843b7431344d81e1e7c7713a20e1834b0e46 (patch)
tree62967d53ee287f27c2a1f62c2fda6c15f930f95a /tunnel
parent4d00c334b18bdf59ddd6d9eb99f52de98390ac44 (diff)
tools: use __ANDROID_MIN_SDK_VERSION__ instead of __ANDROID_API__
The latter is deprecated. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'tunnel')
-rw-r--r--tunnel/tools/ndk-compat/compat.c4
-rw-r--r--tunnel/tools/ndk-compat/compat.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/tunnel/tools/ndk-compat/compat.c b/tunnel/tools/ndk-compat/compat.c
index a610da4c..2c54c086 100644
--- a/tunnel/tools/ndk-compat/compat.c
+++ b/tunnel/tools/ndk-compat/compat.c
@@ -6,7 +6,7 @@
#define FILE_IS_EMPTY
-#if defined(__ANDROID_API__) && __ANDROID_API__ < 18
+#if defined(__ANDROID_MIN_SDK_VERSION__) && __ANDROID_MIN_SDK_VERSION__ < 18
#undef FILE_IS_EMPTY
#include <stdio.h>
#include <stdlib.h>
@@ -58,7 +58,7 @@ ssize_t getline(char **buf, size_t *bufsiz, FILE *fp)
}
#endif
-#if defined(__ANDROID_API__) && __ANDROID_API__ < 24
+#if defined(__ANDROID_MIN_SDK_VERSION__) && __ANDROID_MIN_SDK_VERSION__ < 24
#undef FILE_IS_EMPTY
#include <string.h>
diff --git a/tunnel/tools/ndk-compat/compat.h b/tunnel/tools/ndk-compat/compat.h
index 73cce668..32f6d799 100644
--- a/tunnel/tools/ndk-compat/compat.h
+++ b/tunnel/tools/ndk-compat/compat.h
@@ -4,13 +4,13 @@
*
*/
-#if defined(__ANDROID_API__) && __ANDROID_API__ < 18
+#if defined(__ANDROID_MIN_SDK_VERSION__) && __ANDROID_MIN_SDK_VERSION__ < 18
#include <stdio.h>
ssize_t getdelim(char **buf, size_t *bufsiz, int delimiter, FILE *fp);
ssize_t getline(char **buf, size_t *bufsiz, FILE *fp);
#endif
-#if defined(__ANDROID_API__) && __ANDROID_API__ < 24
+#if defined(__ANDROID_MIN_SDK_VERSION__) && __ANDROID_MIN_SDK_VERSION__ < 24
char *strchrnul(const char *s, int c);
#endif