-
Notifications
You must be signed in to change notification settings - Fork 27
/
12-tvos.patch
70 lines (65 loc) · 1.9 KB
/
12-tvos.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
--- a/include/libssh/socket.h
+++ b/include/libssh/socket.h
@@ -22,6 +22,11 @@
#define SOCKET_H_
#include "libssh/callbacks.h"
+
+#if defined(__APPLE__)
+#include <TargetConditionals.h>
+#endif
+
struct ssh_poll_handle_struct;
/* socket.c */
@@ -37,9 +42,11 @@
socket_t ssh_socket_get_fd_in(ssh_socket s);
#ifndef _WIN32
int ssh_socket_unix(ssh_socket s, const char *path);
+#if !defined(TARGET_OS_TV)
void ssh_execute_command(const char *command, socket_t in, socket_t out);
int ssh_socket_connect_proxycommand(ssh_socket s, const char *command);
#endif
+#endif
void ssh_socket_close(ssh_socket s);
int ssh_socket_write(ssh_socket s,const void *buffer, int len);
int ssh_socket_is_open(ssh_socket s);
--- a/src/client.c
+++ b/src/client.c
@@ -44,6 +44,10 @@
#include "libssh/pki.h"
#include "libssh/kex.h"
+#if defined(__APPLE__)
+#include <TargetConditionals.h>
+#endif
+
#define set_status(session, status) do {\
if (session->common.callbacks && session->common.callbacks->connect_status_function) \
session->common.callbacks->connect_status_function(session->common.callbacks->userdata, status); \
@@ -536,7 +540,7 @@
session->session_state=SSH_SESSION_STATE_SOCKET_CONNECTED;
ssh_socket_set_fd(session->socket, session->opts.fd);
ret=SSH_OK;
-#ifndef _WIN32
+#if !defined(_WIN32) && !defined(TARGET_OS_TV)
} else if (session->opts.ProxyCommand != NULL){
ret = ssh_socket_connect_proxycommand(session->socket,
session->opts.ProxyCommand);
--- a/src/socket.c
+++ b/src/socket.c
@@ -58,6 +58,10 @@
#include "libssh/poll.h"
#include "libssh/session.h"
+#if defined(__APPLE__)
+#include <TargetConditionals.h>
+#endif
+
/**
* @internal
*
@@ -871,7 +875,7 @@
return SSH_OK;
}
-#ifndef _WIN32
+#if !defined(_WIN32) && !defined(TARGET_OS_TV)
/**
* @internal
* @brief executes a command and redirect input and outputs