From 07bc4185ff561e231c8f9e8dc6b5428dda6382fa Mon Sep 17 00:00:00 2001 From: Eduard Rius Date: Mon, 10 Jul 2023 10:16:28 +0200 Subject: [PATCH 1/2] Add conditional statement for variable declaration --- src/mongo/util/net/sock.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mongo/util/net/sock.h b/src/mongo/util/net/sock.h index ab15b09b61e3d..97208e7162443 100644 --- a/src/mongo/util/net/sock.h +++ b/src/mongo/util/net/sock.h @@ -73,7 +73,9 @@ extern const int portRecvFlags; inline void closesocket(int s) { close(s); } -const int INVALID_SOCKET = -1; +#ifndef INVALID_SCOKET +#define INVALID_SOCKET = -1; +#endif typedef int SOCKET; #endif // _WIN32 From 2d59448f25332679b92b59040365545b42ffa67b Mon Sep 17 00:00:00 2001 From: siddux Date: Mon, 4 Sep 2023 20:10:52 +0200 Subject: [PATCH 2/2] Fix typos --- src/mongo/util/net/sock.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mongo/util/net/sock.h b/src/mongo/util/net/sock.h index 97208e7162443..14a88550d6f0a 100644 --- a/src/mongo/util/net/sock.h +++ b/src/mongo/util/net/sock.h @@ -73,9 +73,10 @@ extern const int portRecvFlags; inline void closesocket(int s) { close(s); } -#ifndef INVALID_SCOKET +#ifndef INVALID_SOCKET #define INVALID_SOCKET = -1; #endif + typedef int SOCKET; #endif // _WIN32