ndk-patches: Don't declare sem_{open,close,unlink}
but instead declare `libandroid_sem_{open,close,unlink}` defined in `libandroid-posix-semaphore`.
This commit is contained in:
parent
7d22b52637
commit
2a1524d67c
18
ndk-patches/semaphore.h.patch
Normal file
18
ndk-patches/semaphore.h.patch
Normal file
@ -0,0 +1,18 @@
|
||||
--- ./usr/include/semaphore.h.orig
|
||||
+++ ./usr/include/semaphore.h
|
||||
@@ -71,9 +71,14 @@
|
||||
int sem_trywait(sem_t* __sem);
|
||||
int sem_wait(sem_t* __sem);
|
||||
|
||||
-/* These aren't actually implemented. */
|
||||
+#undef sem_open
|
||||
+#define sem_open libandroid_sem_open
|
||||
sem_t* sem_open(const char* __name, int _flags, ...);
|
||||
+#undef sem_close
|
||||
+#define sem_close libandroid_sem_close
|
||||
int sem_close(sem_t* __sem);
|
||||
+#undef sem_unlink
|
||||
+#define sem_unlink libandroid_sem_unlink
|
||||
int sem_unlink(const char* __name);
|
||||
|
||||
__END_DECLS
|
@ -2,7 +2,7 @@ termux_step_start_build() {
|
||||
TERMUX_STANDALONE_TOOLCHAIN="$TERMUX_COMMON_CACHEDIR/android-r${TERMUX_NDK_VERSION}-api-${TERMUX_PKG_API_LEVEL}"
|
||||
# Bump the below version if a change is made in toolchain setup to ensure
|
||||
# that everyone gets an updated toolchain:
|
||||
TERMUX_STANDALONE_TOOLCHAIN+="-v8"
|
||||
TERMUX_STANDALONE_TOOLCHAIN+="-v9"
|
||||
|
||||
# shellcheck source=/dev/null
|
||||
source "$TERMUX_PKG_BUILDER_SCRIPT"
|
||||
|
Loading…
Reference in New Issue
Block a user