0
0
mirror of https://github.com/termux/termux-packages.git synced 2025-09-27 08:34:56 +00:00
Files
termux-packages/packages/mesa/0016-define-reallocarray.patch
Fredrik Fornwall a0037d1e8d fix(main/mesa): Fix build when targeting newer API level
Fix build errors when targeting a newer API level such as with:

    TERMUX_PKG_API_LEVEL=30 ./build-package.sh -i mesa

1: Change to only define reallocarray if API level < 29

Fixes the build error:

> reallocarray.h:44:1:
> error: static declaration of 'reallocarray' follows non-static declaration

2: Specify the Android API level to bindgen

Fixes the build error:

> Unable to generate bindings: clang diagnosed error:
> [..]/c++/v1/__condition_variable/condition_variable.h:226:14:
> error: use of undeclared identifier 'pthread_cond_clockwait'

3: Only patch in emulated TLS symbol names when if API level < 29

Fixes the build error:

> ld.lld: error: version script assignment of 'global' to
> symbol '__emutls_v._mesa_glapi_tls_Context' failed:
> symbol not defined
2025-09-13 19:12:05 +02:00

296 B