X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=libpcsxcore%2Fsocket.c;h=31f82e2513effe832e0dc62ea6a624e93826c4e8;hp=2e0dc87084dbccae1759b50e102525f79ace60b2;hb=HEAD;hpb=ef79bbde537d6b9c745a7d86cb9df1d04c35590d diff --git a/libpcsxcore/socket.c b/libpcsxcore/socket.c index 2e0dc870..df768e68 100644 --- a/libpcsxcore/socket.c +++ b/libpcsxcore/socket.c @@ -15,6 +15,22 @@ * along with this program; if not, see . */ +#ifdef NO_SOCKET + +int StartServer() { return 0;} +void StopServer() {} +void GetClient() {} +void CloseClient() {} +int HasClient() { return 0;} +int ReadSocket(char * buffer, int len) { return 0;} +int RawReadSocket(char * buffer, int len) { return 0;} +void WriteSocket(char * buffer, int len) {} + +void SetsBlock() {} +void SetsNonblock() {} + +#else // NO_SOCKET + #ifdef _WIN32 #include #endif @@ -119,7 +135,7 @@ void GetClient() { } #endif - sprintf(hello, "000 PCSX Version %s - Debug console\r\n", PACKAGE_VERSION); + sprintf(hello, "000 PCSX Version %s - Debug console\r\n", PCSX_VERSION); WriteSocket(hello, strlen(hello)); ptr = 0; } @@ -190,7 +206,7 @@ int ReadSocket(char * buffer, int len) { } int RawReadSocket(char * buffer, int len) { - int r; + int r = 0; int mlen = len < ptr ? len : ptr; if (!client_socket) @@ -252,3 +268,4 @@ void SetsNonblock() { fcntl(server_socket, F_SETFL, flags | O_NONBLOCK); #endif } +#endif // NO_SOCKET