diff --git a/UPGRADING b/UPGRADING index 5866bd3f..bb224c94 100644 --- a/UPGRADING +++ b/UPGRADING @@ -17,6 +17,7 @@ with newer versions. * socket API: according to the standard, SO_ERROR now only returns asynchronous errors. All other/normal/synchronous errors are (and always were) available via 'errno'. + LWIP_SOCKET_SET_ERRNO has been removed - 'errno' is always set - and required! * compatibility headers: moved from 'src/include/posix' to 'src/include/compat/posix', 'src/include/compat/stdc' etc. diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index c361dcc0..4626a158 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -1849,13 +1849,6 @@ #define LWIP_SOCKET 1 #endif -/** LWIP_SOCKET_SET_ERRNO==1: Set errno when socket functions cannot complete - * successfully, as required by POSIX. Default is POSIX-compliant. - */ -#if !defined LWIP_SOCKET_SET_ERRNO || defined __DOXYGEN__ -#define LWIP_SOCKET_SET_ERRNO 1 -#endif - /** * LWIP_COMPAT_SOCKETS==1: Enable BSD-style sockets functions names through defines. * LWIP_COMPAT_SOCKETS==2: Same as ==1 but correctly named functions are created. diff --git a/src/include/lwip/priv/sockets_priv.h b/src/include/lwip/priv/sockets_priv.h index 6a3a6980..d2ec9171 100644 --- a/src/include/lwip/priv/sockets_priv.h +++ b/src/include/lwip/priv/sockets_priv.h @@ -90,13 +90,9 @@ struct lwip_sock { #endif }; -#if LWIP_SOCKET_SET_ERRNO #ifndef set_errno #define set_errno(err) do { if (err) { errno = (err); } } while(0) #endif -#else /* LWIP_SOCKET_SET_ERRNO */ -#define set_errno(err) -#endif /* LWIP_SOCKET_SET_ERRNO */ #if !LWIP_TCPIP_CORE_LOCKING /** Maximum optlen used by setsockopt/getsockopt */