diff options
author | Rosen Penev <rosenp@gmail.com> | 2020-03-12 15:51:16 -0700 |
---|---|---|
committer | Rosen Penev <rosenp@gmail.com> | 2020-03-12 15:51:16 -0700 |
commit | edc4989d9c3ff89bfd4e4a178f8e057bed720d37 (patch) | |
tree | e58dc662154919b833db0bdae21522515bf4f594 /src/net | |
parent | 2b3d6461e3178e8f9887c60e57409ee1912d92ce (diff) |
change errno.h to cerrno
The former is deprecated by C++14. It's also functionally the same.
From the standard:
19.4
The header<cerrno>is described in Table 43. Its contents are the same as
the POSIX header<errno.h>,except that errno shall be defined as a macro.
[Note: The intent is to remain in close alignment with the POSIX
standard.] A separate errno value shall be provided for each thread.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/Resolver.cxx | 3 | ||||
-rw-r--r-- | src/net/SocketDescriptor.cxx | 3 | ||||
-rw-r--r-- | src/net/SocketError.hxx | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/net/Resolver.cxx b/src/net/Resolver.cxx index d3c94c142..5b7adcb82 100644 --- a/src/net/Resolver.cxx +++ b/src/net/Resolver.cxx @@ -44,9 +44,10 @@ #include <net/if.h> #endif +#include <cerrno> + #include <string.h> #include <stdio.h> -#include <errno.h> static inline bool ai_is_passive(const struct addrinfo *ai) diff --git a/src/net/SocketDescriptor.cxx b/src/net/SocketDescriptor.cxx index 158a44dbc..827ace4b8 100644 --- a/src/net/SocketDescriptor.cxx +++ b/src/net/SocketDescriptor.cxx @@ -42,7 +42,8 @@ #include <netinet/tcp.h> #endif -#include <errno.h> +#include <cerrno> + #include <string.h> int diff --git a/src/net/SocketError.hxx b/src/net/SocketError.hxx index fe783f034..3fa423202 100644 --- a/src/net/SocketError.hxx +++ b/src/net/SocketError.hxx @@ -27,7 +27,7 @@ #include <winsock2.h> typedef DWORD socket_error_t; #else -#include <errno.h> +#include <cerrno> typedef int socket_error_t; #endif |