Commit a5dedc00 authored by Juergen Kosel's avatar Juergen Kosel

Fix Socket_setnonblocking() for Windows (At least if build with MSVC 2010)

Partially revert commit a16cff63 for file
src/Socket.c

- Do not include errno.h for Windows build
- Use errno as a local variable in Socket_setnonblocking() for Windows
Signed-off-by: 's avatarJuergen Kosel <juergen.kosel@softing.com>
parent a16cff63
...@@ -36,7 +36,9 @@ ...@@ -36,7 +36,9 @@
#include "SSLSocket.h" #include "SSLSocket.h"
#endif #endif
#if !defined(WIN32) && !defined(WIN64)
#include <errno.h> #include <errno.h>
#endif
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <signal.h> #include <signal.h>
...@@ -99,6 +101,10 @@ int Socket_setnonblocking(int sock) ...@@ -99,6 +101,10 @@ int Socket_setnonblocking(int sock)
*/ */
int Socket_error(char* aString, int sock) int Socket_error(char* aString, int sock)
{ {
#if defined(WIN32) || defined(WIN64)
int errno;
#endif
FUNC_ENTRY; FUNC_ENTRY;
#if defined(WIN32) || defined(WIN64) #if defined(WIN32) || defined(WIN64)
errno = WSAGetLastError(); errno = WSAGetLastError();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment