aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Duggan <aduggan@synaptics.com>2021-04-15 17:24:01 -0700
committerGitHub <noreply@github.com>2021-04-15 17:24:01 -0700
commit79481d2377212bc1bc1085dc9c29d5bc34faec19 (patch)
treece17f68d7c8accd5602e08eb32283abb0ad787a9
parent7801df5d75d8eda9ac0fd2cac63efc5a90e10c2c (diff)
parent997ad2222436cba9f75ffbc5a9218c163061a85c (diff)
downloadrmi4utils-79481d2377212bc1bc1085dc9c29d5bc34faec19.tar.gz
Merge pull request #14 from enh-google/master
Fix rmi4utils Android build.
-rw-r--r--Application.mk4
-rw-r--r--README5
-rwxr-xr-xrmidevice/hiddevice.cpp5
3 files changed, 9 insertions, 5 deletions
diff --git a/Application.mk b/Application.mk
index 5dd4457..04ddf2b 100644
--- a/Application.mk
+++ b/Application.mk
@@ -1,4 +1,4 @@
APP_BUILD_SCRIPT := $(call my-dir)/Android.mk
-APP_STL := stlport_static
+APP_STL := c++_static
APP_PLATFORM := android-21
-APP_ABI := armeabi armeabi-v7a arm64-v8a \ No newline at end of file
+APP_ABI := armeabi-v7a arm64-v8a
diff --git a/README b/README
index 4e1c94d..02e3e03 100644
--- a/README
+++ b/README
@@ -5,7 +5,6 @@ Build for Android:
This tool depends on HIDRAW being compiled into the Android device's kernel. This may not be enabled by default. When developing on platforms you may need to rebuild the kernel to enable it.
Then:
-Install the latest verison of the Android NDK.
-Copy from the kernel source include/linux/hid.h and include/linux/hidraw.h to $(ANDROID_NDK)/platforms/android-19/arch-arm/usr/include/linux/
+Install the latest version of the Android NDK, and add it to your PATH.
Then run:
-$ make android \ No newline at end of file
+$ make android
diff --git a/rmidevice/hiddevice.cpp b/rmidevice/hiddevice.cpp
index 8405b88..709559d 100755
--- a/rmidevice/hiddevice.cpp
+++ b/rmidevice/hiddevice.cpp
@@ -664,7 +664,12 @@ bool HIDDevice::CheckABSEvent()
unsigned long bit[EV_MAX][NBITS(KEY_MAX)];
+#ifdef __BIONIC__
+ // Android's libc doesn't have the GNU versionsort extension.
+ ndev = scandir(DEV_INPUT_EVENT, &namelist, is_event_device, alphasort);
+#else
ndev = scandir(DEV_INPUT_EVENT, &namelist, is_event_device, versionsort);
+#endif
if (ndev <= 0)
return false;
for (i = 0; i < ndev; i++)