aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2017-07-20 22:39:46 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-07-20 22:39:46 +0000
commita057ef599523d1cfc0bb96cba3278544d4f11fba (patch)
tree01b240b52cbbb5eea18e1b9e557b1268f67f6c1c
parent9d8d337809d3046382765feb20b0e4a492f67fae (diff)
parent0caff6e5ee9f78c67d8a458d880757babc2088d5 (diff)
downloadndk-a057ef599523d1cfc0bb96cba3278544d4f11fba.tar.gz
Merge "Test that we can use ffs even on old API levels."
-rw-r--r--tests/build/ffs/jni/Android.mk6
-rw-r--r--tests/build/ffs/jni/Application.mk1
-rw-r--r--tests/build/ffs/jni/ffs.c10
3 files changed, 17 insertions, 0 deletions
diff --git a/tests/build/ffs/jni/Android.mk b/tests/build/ffs/jni/Android.mk
new file mode 100644
index 000000000..ff4ea3632
--- /dev/null
+++ b/tests/build/ffs/jni/Android.mk
@@ -0,0 +1,6 @@
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := ffs
+LOCAL_SRC_FILES := ffs.c
+include $(BUILD_EXECUTABLE)
diff --git a/tests/build/ffs/jni/Application.mk b/tests/build/ffs/jni/Application.mk
new file mode 100644
index 000000000..5eaff6d9d
--- /dev/null
+++ b/tests/build/ffs/jni/Application.mk
@@ -0,0 +1 @@
+APP_ABI := x86
diff --git a/tests/build/ffs/jni/ffs.c b/tests/build/ffs/jni/ffs.c
new file mode 100644
index 000000000..8f411ce32
--- /dev/null
+++ b/tests/build/ffs/jni/ffs.c
@@ -0,0 +1,10 @@
+#include <strings.h>
+
+#if !defined(__LP64__) && __ANDROID_API__ >= 18
+#error Test misconfigured or minimum API is now 18
+#error In the latter case please remove legacy_strings_inlines.h from bionic.
+#endif
+
+int main(int argc, char* argv[]) {
+ return ffs(argc);
+}