mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-11-28 08:44:21 +00:00
Allow compilation on OSes without IPv6 support
This commit is contained in:
1 parent
bced126fdb
commit
3979dbd082
6 files changed
+37
-14
No files matched your search
+2
-2
@@ -48,11 +48,11 @@ void destroyVideoStream(void) {
|
||||
// UDP Ping proc
|
||||
static void UdpPingThreadProc(void* context) {
|
||||
char pingData[] = { 0x50, 0x49, 0x4E, 0x47 };
|
||||
struct sockaddr_in6 saddr;
|
||||
LC_SOCKADDR saddr;
|
||||
SOCK_RET err;
|
||||
|
||||
memcpy(&saddr, &RemoteAddr, sizeof(saddr));
|
||||
saddr.sin6_port = htons(RTP_PORT);
|
||||
SET_PORT(&saddr, RTP_PORT);
|
||||
|
||||
while (!PltIsThreadInterrupted(&udpPingThread)) {
|
||||
err = sendto(rtpSocket, pingData, sizeof(pingData), 0, (struct sockaddr*)&saddr, RemoteAddrLen);
|
||||
|
||||
Reference in new issue
Block a user