0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-11-23 14:56:16 +00:00
termux-packages/ndk-patches/23c/stdlib.h.patch
Henrik Grimler e7f4ad8b6d
scripts: rename termux_step_setup_toolchain to indicate NDK version
And keep ndk-patches in 23c/ subdirectory.  Run
termux_step_setup_toolchain_23c only if TERMUX_NDK_VERSION equals 23c.

This is a step towards having the possibility to use different NDK
versions.  Using a different NDK version than the one termux
officially supports should *really* not be done except for
testing/debug/development reasons, or if it is strictly necessary to
be able to compile a program (for example for packages that need a
fortran compiler, which at the moment is only supported with old
gcc-using NDKs).
2022-08-13 12:19:59 +02:00

21 lines
610 B
Diff

--- ./usr/include/stdlib.h.orig 2021-08-16 11:50:47.432239182 +0200
+++ ./usr/include/stdlib.h 2021-08-16 11:51:31.102222894 +0200
@@ -33,6 +33,7 @@
#include <bits/wait.h>
#include <malloc.h>
#include <stddef.h>
+#include <stdint.h>
#include <sys/cdefs.h>
#include <xlocale.h>
@@ -224,8 +225,7 @@
size_t wcstombs(char* __dst, const wchar_t* __src, size_t __n);
#if __ANDROID_API__ >= 21
-size_t __ctype_get_mb_cur_max(void) __INTRODUCED_IN(21);
-#define MB_CUR_MAX __ctype_get_mb_cur_max()
+#define MB_CUR_MAX 4
#else
/*
* Pre-L we didn't have any locale support and so we were always the POSIX