From 0411046223b8be61739b61b8bfca89a1cea20c5a Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Fri, 8 Oct 2021 12:10:56 +0530 Subject: [PATCH] [build]: Fix socket type for MinGW Just use SOCKET type for any WIN32 environment including MinGW. This fixes the warnings like: srt/srtcore/channel.cpp:167:19: warning: comparison of integer expressions of different signedness: 'UDPSOCKET' {aka 'int'} and 'SOCKET' {aka 'long long unsigned int'} [-Wsign-compare] 167 | if (m_iSocket == INVALID_SOCKET) | ^ --- srtcore/srt.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/srtcore/srt.h b/srtcore/srt.h index 496112249..4cc2a377f 100644 --- a/srtcore/srt.h +++ b/srtcore/srt.h @@ -152,11 +152,7 @@ typedef int32_t SRTSOCKET; static const int32_t SRTGROUP_MASK = (1 << 30); #ifdef _WIN32 - #ifndef __MINGW32__ - typedef SOCKET SYSSOCKET; - #else - typedef int SYSSOCKET; - #endif + typedef SOCKET SYSSOCKET; #else typedef int SYSSOCKET; #endif