mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-06-16 22:00:55 +00:00
vita: Apply newlib changes
no more need to define `TCP_NODELAY` and `sockaddr_in6` parts
This commit is contained in:
@@ -22,12 +22,7 @@ typedef int SOCKADDR_LEN;
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <sys/select.h>
|
#include <sys/select.h>
|
||||||
#ifndef __vita__
|
|
||||||
#include <netinet/tcp.h>
|
#include <netinet/tcp.h>
|
||||||
#else
|
|
||||||
#include <psp2/net/net.h>
|
|
||||||
#include <enet/enet.h>
|
|
||||||
#endif
|
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
@@ -45,14 +40,6 @@ typedef ssize_t SOCK_RET;
|
|||||||
typedef socklen_t SOCKADDR_LEN;
|
typedef socklen_t SOCKADDR_LEN;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__vita__)
|
|
||||||
#define TCP_NODELAY SCE_NET_TCP_NODELAY
|
|
||||||
|
|
||||||
#define sockaddr_in6 sockaddr_in
|
|
||||||
#define sin6_addr sin_addr
|
|
||||||
#define sin6_port sin_port
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define LastSocketFail() ((LastSocketError() != 0) ? LastSocketError() : -1)
|
#define LastSocketFail() ((LastSocketError() != 0) ? LastSocketError() : -1)
|
||||||
|
|
||||||
// IPv6 addresses have 2 extra characters for URL escaping
|
// IPv6 addresses have 2 extra characters for URL escaping
|
||||||
|
|||||||
Reference in New Issue
Block a user