aboutsummaryrefslogtreecommitdiff
path: root/libpcsxcore/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'libpcsxcore/socket.c')
-rw-r--r--libpcsxcore/socket.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/libpcsxcore/socket.c b/libpcsxcore/socket.c
index 31f82e2..df768e6 100644
--- a/libpcsxcore/socket.c
+++ b/libpcsxcore/socket.c
@@ -15,6 +15,22 @@
* 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