From d39e888302ddb1783610741967b649f68db19c8b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 05:27:01 +0200 Subject: Merging upstream version 3.17.1. Signed-off-by: Daniel Baumann --- src/iperf_pthread.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/iperf_pthread.h (limited to 'src/iperf_pthread.h') diff --git a/src/iperf_pthread.h b/src/iperf_pthread.h new file mode 100644 index 0000000..44828d6 --- /dev/null +++ b/src/iperf_pthread.h @@ -0,0 +1,21 @@ +#include "iperf_config.h" + +#if defined(HAVE_PTHREAD) + +#include + +#if defined(__ANDROID__) + +/* Adding missing `pthread` related definitions in Android. + */ + +#define PTHREAD_CANCEL_ASYNCHRONOUS 0 +#define PTHREAD_CANCEL_ENABLE NULL + +int pthread_setcanceltype(int type, int *oldtype); +int pthread_setcancelstate(int state, int *oldstate); +int pthread_cancel(pthread_t thread_id); + +#endif // defined(__ANDROID__) + +#endif // defined(HAVE_PTHREAD) \ No newline at end of file -- cgit v1.2.3