https://github.com/termux/termux-packages/issues/15852 --- a/configure +++ b/configure @@ -460,9 +460,10 @@ { msg_checking "for function $1" string_function_code=" +#include #include int main() { - return $1; + return (int)(uintptr_t)$1; } " if try_compile_link "$string_function_code" --- a/scripts/checks.sh +++ b/scripts/checks.sh @@ -495,7 +495,8 @@ __func="$1" shift msg_checking "for function $__func" - if try_compile_link "char $__func(); int main(int argc, char *argv[]) { return $__func; }" "$@" + if try_compile_link "#include +char $__func(); int main(int argc, char *argv[]) { return (int)(uintptr_t)$__func; }" "$@" then msg_result yes return 0