Include <cerrno> to provide standard error constants (#338)
See https://en.cppreference.com/w/cpp/header/cerrno for additional details. Some of used constants are defined in this header. Inclusion is necessary to avoid these errors: ``` /home/user/IXWebSocket/ixwebsocket/IXNetSystem.cpp:189:30: error: use of undeclared identifier 'EAFNOSUPPORT' default: errno = EAFNOSUPPORT; return 0; ^ /home/user/IXWebSocket/ixwebsocket/IXNetSystem.cpp:191:17: error: use of undeclared identifier 'ENOSPC' errno = ENOSPC; ^ /home/user/IXWebSocket/ixwebsocket/IXNetSystem.cpp:175:25: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long long') to 'int' [-Wshorten-64-to-32] j = strspn(buf + i, ":0"); ~ ^~~~~~~~~~~~~~~~~~~~~ /home/user/IXWebSocket/ixwebsocket/IXNetSystem.cpp:234:21: error: use of undeclared identifier 'EAFNOSUPPORT' errno = EAFNOSUPPORT; ^ 2 warnings and 3 errors generated. ```
This commit is contained in:
parent
8c15405ed0
commit
47d0b70ebf
@ -17,6 +17,7 @@
|
|||||||
#include <basetsd.h>
|
#include <basetsd.h>
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#include <ws2def.h>
|
#include <ws2def.h>
|
||||||
|
#include <cerrno>
|
||||||
|
|
||||||
#undef EWOULDBLOCK
|
#undef EWOULDBLOCK
|
||||||
#undef EAGAIN
|
#undef EAGAIN
|
||||||
|
Loading…
Reference in New Issue
Block a user