merge from libretro fork
[pcsx_rearmed.git] / libpcsxcore / socket.c
index 31f82e2..df768e6 100644 (file)
  *  along with this program; if not, see <http://www.gnu.org/licenses>.
  */
 
+#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 <winsock2.h>
 #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;
 }
@@ -252,3 +268,4 @@ void SetsNonblock() {
     fcntl(server_socket, F_SETFL, flags | O_NONBLOCK);
 #endif
 }
+#endif // NO_SOCKET