From 9c1ef2203ff3bb1950d1c033b88dc12c280e845d Mon Sep 17 00:00:00 2001 From: m910q Date: Fri, 26 Aug 2022 17:11:57 +0200 Subject: [PATCH] Fixed Socket.Select() timeout on Linux --- BeefLibs/corlib/src/Net/Socket.bf | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/BeefLibs/corlib/src/Net/Socket.bf b/BeefLibs/corlib/src/Net/Socket.bf index 25eba8dd..81489794 100644 --- a/BeefLibs/corlib/src/Net/Socket.bf +++ b/BeefLibs/corlib/src/Net/Socket.bf @@ -40,6 +40,13 @@ namespace System.Net } } + [CRepr] + public struct TimeVal + { + public int32 mSec; + public int32 mUSec; + } + #else public struct HSocket : uint32 { @@ -77,16 +84,15 @@ namespace System.Net return (mSocketBitMasks[fd / BITS_PER_MASK] & (1U << (fd & (BITS_PER_MASK - 1)))) != 0; } } + + [CRepr] + public struct TimeVal + { + public int64 mSec; + public int32 mUSec; + } #endif - [CRepr] - public struct TimeVal - { - public int32 mSec; - public int32 mUSec; - } - - #if BF_PLATFORM_WINDOWS [CRepr]