Fix build when targeting Android 7 or later #130

Merged
fornwall merged 1 commit from fix-android-7-build into master 2020-01-22 06:05:10 -06:00
fornwall commented 2019-12-11 18:54:38 -06:00 (Migrated from github.com)

Support for pthread_barrier was introduced in Android 7, so trying to build a custom implementation of that clashes with the system headers.

Support for pthread_barrier was introduced in Android 7, so trying to build a custom implementation of that clashes with the system headers.
z3ntu commented 2019-12-12 02:49:03 -06:00 (Migrated from github.com)

Can confirm that compilation works fine with this patch for sdk 29 (~/Android/Sdk/ndk/20.0.5594570/ndk-build APP_PLATFORM=android-29 and the patch from #24) and it fails without this patch.

(also the reference for "pthread_barrier was introduced in Android 7" can be found at https://android.googlesource.com/platform/bionic/+/master/docs/status.md)

@fornwall Do you have a better solution for #24 or how are you compiling hidapi for Android?

Can confirm that compilation works fine with this patch for sdk 29 (`~/Android/Sdk/ndk/20.0.5594570/ndk-build APP_PLATFORM=android-29` and the patch from #24) and it fails without this patch. (also the reference for "pthread_barrier was introduced in Android 7" can be found at https://android.googlesource.com/platform/bionic/+/master/docs/status.md) @fornwall Do you have a better solution for #24 or how are you compiling hidapi for Android?
Youw commented 2019-12-12 03:09:21 -06:00 (Migrated from github.com)

Thanks @z3ntu for checking.

Thanks @z3ntu for checking.
Youw (Migrated from github.com) approved these changes 2019-12-12 03:09:30 -06:00
fornwall commented 2019-12-12 04:18:06 -06:00 (Migrated from github.com)

@z3ntu Thanks! Regarding #24, I'm not using ndk-build when building here, instead using the NDK as a traditional cross-compilation toolchain to build a package for Termux.

@z3ntu Thanks! Regarding #24, I'm not using ndk-build when building here, instead using the NDK as a traditional cross-compilation toolchain to build a package for [Termux](https://termux.com/).
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-libusb/hidapi!130
No description provided.