Mercurial > code
changeset 348:c4381c345f2d
Socket: various compiler fixes
author | David Demelier <markand@malikania.fr> |
---|---|
date | Sat, 04 Apr 2015 19:58:48 +0200 |
parents | b8d6b7f0bec4 |
children | 3a1380b4428c |
files | C++/modules/Socket/Socket.h C++/modules/Socket/SocketSsl.cpp C++/modules/Socket/SocketSsl.h |
diffstat | 3 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/C++/modules/Socket/Socket.h Thu Apr 02 19:06:53 2015 +0200 +++ b/C++/modules/Socket/Socket.h Sat Apr 04 19:58:48 2015 +0200 @@ -40,6 +40,7 @@ * _WIN32_WINNT variable is greater or equal to 0x0600. */ +#include <cstdlib> #include <cstring> #include <exception> #include <string> @@ -229,7 +230,7 @@ * must also call finish himself. */ #if !defined(SOCKET_WSA_NO_INIT) - std::atexit(finish); + atexit(finish); #endif } }
--- a/C++/modules/Socket/SocketSsl.cpp Thu Apr 02 19:06:53 2015 +0200 +++ b/C++/modules/Socket/SocketSsl.cpp Sat Apr 04 19:58:48 2015 +0200 @@ -22,7 +22,7 @@ namespace { -const SSL_METHOD *sslMethod(int mflags) +auto sslMethod(int mflags) { if (mflags & SocketSslOptions::All) return SSLv23_method();
--- a/C++/modules/Socket/SocketSsl.h Thu Apr 02 19:06:53 2015 +0200 +++ b/C++/modules/Socket/SocketSsl.h Sat Apr 04 19:58:48 2015 +0200 @@ -19,6 +19,7 @@ #ifndef _SOCKET_SSL_NG_H_ #define _SOCKET_SSL_NG_H_ +#include <cstdint> #include <atomic> #include <memory> #include <mutex> @@ -117,7 +118,7 @@ SSL_library_init(); SSL_load_error_strings(); - std::atexit(sslTerminate); + atexit(sslTerminate); } }