mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-08-14 18:57:07 -07:00
FreeBSD Fixes
This commit is contained in:
parent
59a8f0168c
commit
b716bf42ac
4 changed files with 9 additions and 1 deletions
|
@ -35,6 +35,7 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netdb.h>
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
#define SESSION_OSTYPE "Win10.0.0"
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netdb.h>
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -30,7 +30,9 @@
|
|||
#include <ws2tcpip.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/ip.h>
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -253,9 +255,12 @@ CHIAKI_EXPORT ChiakiErrorCode chiaki_takion_connect(ChiakiTakion *takion, Chiaki
|
|||
#if defined(_WIN32)
|
||||
const DWORD dontfragment_val = 1;
|
||||
r = setsockopt(takion->sock, IPPROTO_IP, IP_DONTFRAGMENT, (const void *)&dontfragment_val, sizeof(dontfragment_val));
|
||||
#elif defined(__FreeBSD__)
|
||||
const int dontfrag_val = 1;
|
||||
r = setsockopt(takion->sock, IPPROTO_IP, IP_DONTFRAG, (const void *)&dontfrag_val, sizeof(dontfrag_val));
|
||||
#else
|
||||
const int mtu_discover_val = IP_PMTUDISC_DO;
|
||||
r = setsockopt(takion->sock, IPPROTO_IP, IP_MTU_DISCOVER, (const void *) &mtu_discover_val, sizeof(mtu_discover_val));
|
||||
r = setsockopt(takion->sock, IPPROTO_IP, IP_MTU_DISCOVER, (const void *)&mtu_discover_val, sizeof(mtu_discover_val));
|
||||
#endif
|
||||
if(r < 0)
|
||||
{
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#else
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue