mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-02-16 02:21:07 +00:00
vita: Reduce vita custom defines
This commit is contained in:
@@ -18,26 +18,21 @@ typedef int SOCK_RET;
|
|||||||
typedef int SOCKADDR_LEN;
|
typedef int SOCKADDR_LEN;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#if defined(__vita__)
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <sys/select.h>
|
||||||
|
#ifndef __vita__
|
||||||
|
#include <netinet/tcp.h>
|
||||||
|
#else
|
||||||
#include <psp2/net/net.h>
|
#include <psp2/net/net.h>
|
||||||
#include <enet/enet.h>
|
#include <enet/enet.h>
|
||||||
#include <sys/types.h>
|
#endif
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/select.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
#include <netdb.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#else
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/select.h>
|
|
||||||
#include <netinet/tcp.h>
|
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#define ioctlsocket ioctl
|
#define ioctlsocket ioctl
|
||||||
#define LastSocketError() errno
|
#define LastSocketError() errno
|
||||||
@@ -56,8 +51,6 @@ typedef socklen_t SOCKADDR_LEN;
|
|||||||
#define sockaddr_in6 sockaddr_in
|
#define sockaddr_in6 sockaddr_in
|
||||||
#define sin6_addr sin_addr
|
#define sin6_addr sin_addr
|
||||||
#define sin6_port sin_port
|
#define sin6_port sin_port
|
||||||
#define INET6_ADDRSTRLEN 128
|
|
||||||
#define inet_ntop sceNetInetNtop
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LastSocketFail() ((LastSocketError() != 0) ? LastSocketError() : -1)
|
#define LastSocketFail() ((LastSocketError() != 0) ? LastSocketError() : -1)
|
||||||
|
|||||||
Reference in New Issue
Block a user