fix build on termux
This commit is contained in:
parent
58418d5310
commit
7a4e867c5d
@ -27,6 +27,7 @@
|
|||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
#include <limits.h>
|
||||||
#include <stdatomic.h>
|
#include <stdatomic.h>
|
||||||
#include <stddef.h> /* offsetof */
|
#include <stddef.h> /* offsetof */
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@ -56,6 +57,14 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
// android ndk workaround
|
||||||
|
#ifndef LLONG_MAX
|
||||||
|
#define LLONG_MAX 9223372036854775807LL
|
||||||
|
#endif
|
||||||
|
#ifndef LLONG_MIN
|
||||||
|
#define LLONG_MIN (-9223372036854775807LL - 1)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __NR_io_uring_setup
|
#ifndef __NR_io_uring_setup
|
||||||
# define __NR_io_uring_setup 425
|
# define __NR_io_uring_setup 425
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -28,7 +28,9 @@
|
|||||||
#include "uv.h"
|
#include "uv.h"
|
||||||
|
|
||||||
/* Refs: https://github.com/libuv/libuv/issues/4369 */
|
/* Refs: https://github.com/libuv/libuv/issues/4369 */
|
||||||
#if defined(__ANDROID__)
|
/* Refs: https://github.com/libuv/libuv/issues/5092 */
|
||||||
|
#if defined(__ANDROID__) && __ANDROID_API__ >= __ANDROID_API_Q__
|
||||||
|
#define USE_FDSAN
|
||||||
#include <android/fdsan.h>
|
#include <android/fdsan.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -149,7 +151,7 @@ void log_tap_result(int test_count,
|
|||||||
|
|
||||||
void enable_fdsan(void) {
|
void enable_fdsan(void) {
|
||||||
/* Refs: https://github.com/libuv/libuv/issues/4369 */
|
/* Refs: https://github.com/libuv/libuv/issues/4369 */
|
||||||
#if defined(__ANDROID__)
|
#if defined(USE_FDSAN)
|
||||||
android_fdsan_set_error_level(ANDROID_FDSAN_ERROR_LEVEL_WARN_ALWAYS);
|
android_fdsan_set_error_level(ANDROID_FDSAN_ERROR_LEVEL_WARN_ALWAYS);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user