From a4e438bca642ac2b44abcf3ab2bc8ae9f9207a4a Mon Sep 17 00:00:00 2001 From: disarray2077 <86157825+disarray2077@users.noreply.github.com> Date: Sun, 18 Feb 2024 14:06:21 -0300 Subject: [PATCH] Fix Socket constants on Linux --- BeefLibs/corlib/src/Net/Socket.bf | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/BeefLibs/corlib/src/Net/Socket.bf b/BeefLibs/corlib/src/Net/Socket.bf index 2a233076..9e45aa22 100644 --- a/BeefLibs/corlib/src/Net/Socket.bf +++ b/BeefLibs/corlib/src/Net/Socket.bf @@ -166,9 +166,15 @@ namespace System.Net public const int SOCK_DGRAM = 2; public const int IPPROTO_TCP = 6; public const int IPPROTO_UDP = 17; +#if BF_PLATFORM_WINDOWS public const int SOL_SOCKET = 0xffff; public const int SO_REUSEADDR = 0x0004; - public const int SO_BROADCAST = 0x0020; + public const int SO_BROADCAST = 0x0020; +#else + public const int SOL_SOCKET = 1; + public const int SO_REUSEADDR = 2; + public const int SO_BROADCAST = 6; +#endif public const IPv4Address INADDR_ANY = default; #if BF_PLATFORM_WINDOWS @@ -618,4 +624,4 @@ namespace System.Net return .Ok; } } -} \ No newline at end of file +}