From 47d0b70ebf8704a29a87fa714bc4346e50af1a38 Mon Sep 17 00:00:00 2001 From: CryptoManiac Date: Tue, 4 Jan 2022 23:13:19 +0300 Subject: [PATCH] Include 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. ``` --- ixwebsocket/IXNetSystem.h | 1 + 1 file changed, 1 insertion(+) diff --git a/ixwebsocket/IXNetSystem.h b/ixwebsocket/IXNetSystem.h index 21131b4e..7ca58f49 100644 --- a/ixwebsocket/IXNetSystem.h +++ b/ixwebsocket/IXNetSystem.h @@ -17,6 +17,7 @@ #include #include #include +#include #undef EWOULDBLOCK #undef EAGAIN