Commit 35a3c501 authored by Howard Chu's avatar Howard Chu
Browse files

Define sock_errno() and sock_errstr() for Unix and winsock.

parent 9a582021
......@@ -77,6 +77,9 @@
#define EINPROGRESS WSAEINPROGRESS
#define ETIMEDOUT WSAETIMEDOUT
#define sock_errno() WSAGetLastError()
#define sock_errstr(err) WSAGetLastErrorString()
#elif MACOS
# define tcp_close( s ) tcpclose( s )
......@@ -93,6 +96,8 @@
#else
# define tcp_close( s ) close( s )
# define sock_errno() errno
# define sock_errstr(err) strerror(err)
#endif /* MACOS */
#ifndef ioctl_t
......
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