summaryrefslogtreecommitdiffstats
path: root/src/iperf_pthread.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:27:01 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:27:01 +0000
commitd39e888302ddb1783610741967b649f68db19c8b (patch)
tree44cd4104b105455dc5e19be9cc11f9a9141923a5 /src/iperf_pthread.h
parentAdding debian version 3.16-1. (diff)
downloadiperf3-d39e888302ddb1783610741967b649f68db19c8b.tar.xz
iperf3-d39e888302ddb1783610741967b649f68db19c8b.zip
Merging upstream version 3.17.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/iperf_pthread.h')
-rw-r--r--src/iperf_pthread.h21
1 files changed, 21 insertions, 0 deletions
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 <pthread.h>
+
+#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