summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authormsvensson@pilot.blaudden <>2007-03-28 15:34:52 +0200
committermsvensson@pilot.blaudden <>2007-03-28 15:34:52 +0200
commitf8b32417266793b2cad9d452f7c5731f9607fbf9 (patch)
treeb13e2d20a3576dc87b2c4970c8e1c8cba6d6f40f /extra
parent1577caab52c81c0e4a252ffdacc7e6e7ad857f59 (diff)
downloadmariadb-git-f8b32417266793b2cad9d452f7c5731f9607fbf9.tar.gz
Set yaSSL to use same type as MySQL do for socket handles
Diffstat (limited to 'extra')
-rw-r--r--extra/yassl/include/openssl/ssl.h10
-rw-r--r--extra/yassl/src/ssl.cpp2
2 files changed, 9 insertions, 3 deletions
diff --git a/extra/yassl/include/openssl/ssl.h b/extra/yassl/include/openssl/ssl.h
index 29add5ca37d..7dd33e3fcad 100644
--- a/extra/yassl/include/openssl/ssl.h
+++ b/extra/yassl/include/openssl/ssl.h
@@ -190,11 +190,17 @@ enum { /* ERR Constants */
EVP_R_BAD_DECRYPT = 2
};
-
+/*
+ Allow type used by SSL_set_fd to be changed, default to int
+ in order to be compatible with OpenSSL
+ */
+#ifndef YASSL_SOCKET_T_DEFINED
+typedef int YASSL_SOCKET_T;
+#endif
SSL_CTX* SSL_CTX_new(SSL_METHOD*);
SSL* SSL_new(SSL_CTX*);
-int SSL_set_fd (SSL*, int);
+int SSL_set_fd (SSL*, YASSL_SOCKET_T);
int SSL_connect(SSL*);
int SSL_write(SSL*, const void*, int);
int SSL_read(SSL*, void*, int);
diff --git a/extra/yassl/src/ssl.cpp b/extra/yassl/src/ssl.cpp
index 5bbde13a652..5ccc45ded2a 100644
--- a/extra/yassl/src/ssl.cpp
+++ b/extra/yassl/src/ssl.cpp
@@ -229,7 +229,7 @@ void SSL_free(SSL* ssl)
}
-int SSL_set_fd(SSL* ssl, int fd)
+int SSL_set_fd(SSL* ssl, YASSL_SOCKET_T fd)
{
ssl->useSocket().set_fd(fd);
return SSL_SUCCESS;