From 430dc8601f110efdb306c6af425484e95dbbea3a Mon Sep 17 00:00:00 2001 From: Leonard Kugis Date: Wed, 1 Oct 2025 03:04:21 +0200 Subject: Initial commit for android-stable --- compat/android28.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 compat/android28.h (limited to 'compat/android28.h') diff --git a/compat/android28.h b/compat/android28.h new file mode 100644 index 0000000..9ace496 --- /dev/null +++ b/compat/android28.h @@ -0,0 +1,22 @@ +#pragma once +#include + +#if defined(__BIONIC__) +#ifndef PTHREAD_CANCEL_ENABLE +#define PTHREAD_CANCEL_ENABLE 0 +#endif +#ifndef PTHREAD_CANCEL_DISABLE +#define PTHREAD_CANCEL_DISABLE 0 +#endif + +static inline int pthread_setcancelstate(int state, int *oldstate) { + if (oldstate) *oldstate = state; + return 0; +} + +static inline int pthread_cancel(pthread_t t) { + (void)t; + return 0; +} +#endif + -- cgit v1.2.3