-
Notifications
You must be signed in to change notification settings - Fork 255
Added compiling target Android support #982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: devel
Are you sure you want to change the base?
Conversation
ef43ce6
to
3eff852
Compare
Thanks, this will need to be reworked so there are no standalone ifdefs just for android. Compatibility wrappers should be hidden in files, detected at build time and the implementation switched by some ifdef. I'll apply the patches without changes as this is what you've probably tested and do the updates myself. As this will become supported config, we'll need github actions for that too. |
The |
pthread/pthread.sym
Outdated
pthread_cancel; /* used */ | ||
local: | ||
*; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed? The file is not used anywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's for debugging pthread
Created `pthread/btrfs_pthread.h` and `pthread/btrfs_pthread.c` to allow Android and bionic libc emulating `pthread_setcanceltype`, `pthread_setcancelstate`, `pthread_cancel` and some other definitions. Since Android NDK does not support `pthread_cancel()`, this workaround method uses `pthread_kill()` instead. Signed-off-by: Shadichy <shadichy@blisslabs.org>
This patch is from termux/termux-packages Signed-off-by: Shadichy <shadichy@blisslabs.org>
…rgeting Android Android NDK does not support `qsort_r`, this workaround first add a list of `id` to struct `compare`, and then reverse the list, and finally do the sorting stuffs using `qsort`. This helps preserve the sorting order without `qsort_r` Signed-off-by: Shadichy <shadichy@blisslabs.org>
Signed-off-by: Shadichy <shadichy@blisslabs.org>
Signed-off-by: Shadichy <shadichy@blisslabs.org>
Signed-off-by: Shadichy <shadichy@blisslabs.org>
ctx.compar = compar; | ||
ctx.arg = arg; | ||
struct qsort_r_context *old_ctx = qsort_r_ctx; | ||
qsort_r_ctx = &ctx; |
Check warning
Code scanning / CodeQL
Local variable address stored in non-local memory Warning
source
…ader definitions Signed-off-by: Shadichy <shadichy@blisslabs.org>
No description provided.