diff options
author | Andrew Duggan <aduggan@synaptics.com> | 2021-04-15 17:24:01 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-15 17:24:01 -0700 |
commit | 79481d2377212bc1bc1085dc9c29d5bc34faec19 (patch) | |
tree | ce17f68d7c8accd5602e08eb32283abb0ad787a9 | |
parent | 7801df5d75d8eda9ac0fd2cac63efc5a90e10c2c (diff) | |
parent | 997ad2222436cba9f75ffbc5a9218c163061a85c (diff) | |
download | rmi4utils-79481d2377212bc1bc1085dc9c29d5bc34faec19.tar.gz |
Merge pull request #14 from enh-google/master
Fix rmi4utils Android build.
-rw-r--r-- | Application.mk | 4 | ||||
-rw-r--r-- | README | 5 | ||||
-rwxr-xr-x | rmidevice/hiddevice.cpp | 5 |
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 @@ -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++) |