Skip to content

Commit

Permalink
fix FastOpen compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
wfurt authored and github-actions committed Jan 7, 2025
1 parent bbd7132 commit 58de529
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/native/libs/System.Native/pal_networking.c
Original file line number Diff line number Diff line change
Expand Up @@ -1660,6 +1660,11 @@ int32_t SystemNative_Connect(intptr_t socket, uint8_t* socketAddress, int32_t so
return err == 0 ? Error_SUCCESS : SystemNative_ConvertErrorPlatformToPal(errno);
}

#if defined(__linux__) && !defined(TCP_FASTOPEN_CONNECT)
// fixup if compiled against old Kernel headers.
// Can be removed once we have at least 4.11
#define TCP_FASTOPEN_CONNECT 30
#endif
int32_t SystemNative_Connectx(intptr_t socket, uint8_t* socketAddress, int32_t socketAddressLen, uint8_t* data, int32_t dataLen, int32_t tfo, int* sent)
{
if (socketAddress == NULL || socketAddressLen < 0 || sent == NULL)
Expand Down

0 comments on commit 58de529

Please sign in to comment.