Skip to content

Commit 2c10cdb

Browse files
committed
Hack to fix Apple compile regardless of compiler flags
P4:10594974 (cherry picked from commit 09b7a38)
1 parent 886cf23 commit 2c10cdb

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

src/public/tier0/platform_sockets.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,25 @@ typedef char SteamNetworkingErrMsg[ 1024 ];
118118
#define USE_POLL
119119

120120
#define PlatformSupportsRecvTOS() true
121+
122+
// Depending on compiler flags, these might not be defined. But they are
123+
// part of the kernel ABI, so hardcoding the value is safe.
124+
#ifdef IP_RECVTOS
125+
COMPILE_TIME_ASSERT( IP_RECVTOS == 27 );
126+
#else
127+
#define IP_RECVTOS 27
128+
#endif
129+
#ifdef IPV6_RECVTCLASS
130+
COMPILE_TIME_ASSERT( IPV6_RECVTCLASS == 35 );
131+
#else
132+
#define IPV6_RECVTCLASS 35
133+
#endif
134+
#ifdef IPV6_TCLASS
135+
COMPILE_TIME_ASSERT( IPV6_TCLASS == 36 );
136+
#else
137+
#define IPV6_TCLASS 36
138+
#endif
139+
121140
#elif defined(__FreeBSD__)
122141

123142
// FreeBSD provides kqueue, but we don't support it, so just use old-school poll()

0 commit comments

Comments
 (0)