summaryrefslogtreecommitdiffhomepage
path: root/tunnel/tools/ndk-compat/compat.h
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2020-03-09 19:00:14 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2020-03-09 19:24:26 +0530
commitadc613d8011af7c508050badb1272e8326554c39 (patch)
tree4eadedc0767e1f4f482b7c22ec905329acab62a6 /tunnel/tools/ndk-compat/compat.h
parentfd573f6c1c37bcfcd09237dfcd55e08b1e0eaff9 (diff)
Migrate tunnel related classes to tunnel/ Gradle module
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'tunnel/tools/ndk-compat/compat.h')
-rw-r--r--tunnel/tools/ndk-compat/compat.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/tunnel/tools/ndk-compat/compat.h b/tunnel/tools/ndk-compat/compat.h
new file mode 100644
index 00000000..52f6c127
--- /dev/null
+++ b/tunnel/tools/ndk-compat/compat.h
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: BSD
+ *
+ * Copyright © 2017-2019 WireGuard LLC. All Rights Reserved.
+ *
+ */
+
+#if defined(__ANDROID_API__) && __ANDROID_API__ < 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
+char *strchrnul(const char *s, int c);
+#endif
+