diff --git a/lib/socket.c b/lib/socket.c index c6b27f51..e80f61fd 100644 --- a/lib/socket.c +++ b/lib/socket.c @@ -816,16 +816,19 @@ rpc_connect_sockaddr_async(struct rpc_context *rpc) */ { struct sockaddr_storage ss; - struct sockaddr_in *sin; - struct sockaddr_in6 *sin6; + struct sockaddr_in *sin; +#if !defined(PS3_PPU) && !defined(PS2_EE) + struct sockaddr_in6 *sin6; +#endif static int portOfs = 0; const int firstPort = 512; /* >= 512 according to Sun docs */ const int portCount = IPPORT_RESERVED - firstPort; int startOfs, port, rc; - sin = (struct sockaddr_in *)&ss; - sin6 = (struct sockaddr_in6 *)&ss; - + sin = (struct sockaddr_in *)&ss; +#if !defined(PS3_PPU) && !defined(PS2_EE) + sin6 = (struct sockaddr_in6 *)&ss; +#endif if (portOfs == 0) { portOfs = rpc_current_time() % 400; } diff --git a/ps2_ee/ps2_compat.h b/ps2_ee/ps2_compat.h index 8662d864..169315d9 100644 --- a/ps2_ee/ps2_compat.h +++ b/ps2_ee/ps2_compat.h @@ -28,6 +28,7 @@ #include #include #include +#include typedef unsigned long int fsfilcnt_t; @@ -35,9 +36,6 @@ typedef unsigned long int fsfilcnt_t; #define major(a) 0 #define minor(a) 0 #define O_NOFOLLOW 0 -#define X_OK 1 -#define W_OK 2 -#define R_OK 4 struct statvfs { unsigned long int f_bsize; @@ -59,6 +57,7 @@ struct statvfs { #define write(a,b,c) lwip_write(a,b,c) #define read(a,b,c) lwip_read(a,b,c) +#undef gethostbyname /* PS2SDK has gethostbyname defined */ #define gethostbyname(a) lwip_gethostbyname(a) #define close(a) lwip_close(a)