From 67a84e98bd284cc908c561fd4af77bf40be09161 Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 25 Jan 2024 16:57:11 +0800 Subject: [PATCH] fix libintl for android r26b (#3172) --- packages/l/libintl/port/0.21/xmake.lua | 6 +++++- packages/l/libintl/port/0.22.3/xmake.lua | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/l/libintl/port/0.21/xmake.lua b/packages/l/libintl/port/0.21/xmake.lua index ac872e7f7..6c72cc037 100644 --- a/packages/l/libintl/port/0.21/xmake.lua +++ b/packages/l/libintl/port/0.21/xmake.lua @@ -229,7 +229,11 @@ void test() {environ.foo = 1;}]], {includes = is_plat("windows") and "stdlib.h" -- config.h variables configvar_check_ctypes("HAVE_STDINT_H_WITH_UINTMAX", "uintmax_t", {includes = "stdint.h"}) configvar_check_ctypes("HAVE_UINTMAX_T", "uintmax_t", {includes = "stdint.h"}) -configvar_check_links("HAVE_PTHREAD_API", "pthread") +if is_plat("android") then + configvar_check_cfuncs("HAVE_PTHREAD_API", "pthread_create", {includes = "pthread.h"}) +else + configvar_check_links("HAVE_PTHREAD_API", "pthread") +end configvar_check_csnippets("HAVE_ALLOCA", [[ #ifdef __GNUC__ # define alloca __builtin_alloca diff --git a/packages/l/libintl/port/0.22.3/xmake.lua b/packages/l/libintl/port/0.22.3/xmake.lua index 83e38c43c..e0b5c4533 100644 --- a/packages/l/libintl/port/0.22.3/xmake.lua +++ b/packages/l/libintl/port/0.22.3/xmake.lua @@ -243,7 +243,11 @@ end end configvar_check_ctypes("HAVE_STDINT_H_WITH_UINTMAX", "uintmax_t", {includes = "stdint.h"}) configvar_check_ctypes("HAVE_UINTMAX_T", "uintmax_t", {includes = "stdint.h"}) -configvar_check_links("HAVE_PTHREAD_API", "pthread") +if is_plat("android") then + configvar_check_cfuncs("HAVE_PTHREAD_API", "pthread_create", {includes = "pthread.h"}) +else + configvar_check_links("HAVE_PTHREAD_API", "pthread") +end configvar_check_ctypes("HAVE_PTHREAD_RWLOCK", "pthread_rwlock_t", {includes = "pthread.h"}) configvar_check_cfuncs("HAVE_THRD_CREATE", "thrd_create", {includes = "threads.h"}) configvar_check_csnippets("HAVE_ALLOCA", [[