aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2020-08-01 22:26:05 +0200
committertomsmeding <tom.smeding@gmail.com>2020-08-01 22:26:05 +0200
commit50c74dc0514c0135195de6cd52d2ae33325c2385 (patch)
tree430d90ec00978868dbfa15988bf3fd402f2264f5
parent4c5dee222b940dcfdf6f7356b6fa3b3bf4dbcb73 (diff)
sshnc: Compile on android
-rw-r--r--ssh/sshnc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ssh/sshnc.c b/ssh/sshnc.c
index 7d42de8..0c912dd 100644
--- a/ssh/sshnc.c
+++ b/ssh/sshnc.c
@@ -1,11 +1,16 @@
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
-#include <threads.h>
#include <assert.h>
#include <libssh/callbacks.h>
#include "sshnc.h"
+#ifdef __ANDROID__
+#define thread_local _Thread_local
+#else
+#include <threads.h>
+#endif
+
// - We never use ssh_disconnect, just ssh_free. I believe the only added value
// of ssh_disconnect is that it sends a polite quit message to the server,