mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-08-17 17:05:50 +00:00
Fix incorrect checks for AF_INET6
This commit is contained in:
parent
221af82950
commit
3adacb876d
@ -86,7 +86,7 @@ typedef ssize_t SOCK_RET;
|
||||
typedef socklen_t SOCKADDR_LEN;
|
||||
#endif
|
||||
|
||||
#ifdef AF_INET
|
||||
#ifdef AF_INET6
|
||||
typedef struct sockaddr_in6 LC_SOCKADDR;
|
||||
#define SET_PORT(addr, port) ((addr)->sin6_port = htons(port))
|
||||
#else
|
||||
@ -96,7 +96,7 @@ typedef struct sockaddr_in LC_SOCKADDR;
|
||||
|
||||
#define LastSocketFail() ((LastSocketError() != 0) ? LastSocketError() : -1)
|
||||
|
||||
#ifdef AF_INET
|
||||
#ifdef AF_INET6
|
||||
// IPv6 addresses have 2 extra characters for URL escaping
|
||||
#define URLSAFESTRING_LEN (INET6_ADDRSTRLEN+2)
|
||||
#else
|
||||
|
Loading…
x
Reference in New Issue
Block a user