aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/netclient.c8
-rw-r--r--src/netdist.c6
-rw-r--r--src/netrec.c2
-rw-r--r--src/netserver.c2
4 files changed, 9 insertions, 9 deletions
diff --git a/src/netclient.c b/src/netclient.c
index 7ad252f..0503b97 100644
--- a/src/netclient.c
+++ b/src/netclient.c
@@ -29,7 +29,7 @@
#include <sys/types.h>
#include <string.h>
#include <pthread.h>
-#ifdef UNIX
+#if defined(UNIX) || defined(unix)
#include <sys/socket.h>
#include <sys/errno.h>
#include <netinet/in.h>
@@ -71,7 +71,7 @@ static void sys_sockerror(char *s)
int err = WSAGetLastError();
if (err == 10054) return;
#endif
-#ifdef UNIX
+#if defined(UNIX) || defined(unix)
int err = errno;
#endif
post("%s: %s (%d)\n", s, strerror(err), err);
@@ -79,7 +79,7 @@ static void sys_sockerror(char *s)
static void sys_closesocket(int fd) {
-#ifdef UNIX
+#if defined(UNIX) || defined(unix)
close(fd);
#endif
#ifdef NT
@@ -345,4 +345,4 @@ void netclient_setup(void)
class_addmethod(netclient_class, (t_method)netclient_rcv, gensym("receive"), 0);
class_addmethod(netclient_class, (t_method)netclient_rcv, gensym("rcv"), 0);
class_sethelpsymbol(netclient_class, gensym("maxlib/help-netclient.pd"));
-} \ No newline at end of file
+}
diff --git a/src/netdist.c b/src/netdist.c
index 4f91c2d..12a2e9d 100644
--- a/src/netdist.c
+++ b/src/netdist.c
@@ -29,7 +29,7 @@
#include <sys/types.h>
#include <string.h>
#include <pthread.h>
-#ifdef UNIX
+#if defined(UNIX) || defined(unix)
#include <sys/socket.h>
#include <sys/errno.h>
#include <netinet/in.h>
@@ -67,7 +67,7 @@ static void sys_sockerror(char *s)
int err = WSAGetLastError();
if (err == 10054) return;
#endif
-#ifdef UNIX
+#if defined(UNIX) || defined(unix)
int err = errno;
#endif
post("%s: %s (%d)\n", s, strerror(err), err);
@@ -75,7 +75,7 @@ static void sys_sockerror(char *s)
static void sys_closesocket(int fd) {
-#ifdef UNIX
+#if defined(UNIX) || defined(unix)
close(fd);
#endif
#ifdef NT
diff --git a/src/netrec.c b/src/netrec.c
index 0b5d87e..ca89ccb 100644
--- a/src/netrec.c
+++ b/src/netrec.c
@@ -31,7 +31,7 @@
#include <errno.h>
#include <string.h>
#include <stdio.h>
-#ifdef UNIX
+#if defined(UNIX) || defined(unix)
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
diff --git a/src/netserver.c b/src/netserver.c
index 199b7ee..ae0a13a 100644
--- a/src/netserver.c
+++ b/src/netserver.c
@@ -33,7 +33,7 @@
#include <string.h>
#include <stdio.h>
#include <pthread.h>
-#ifdef UNIX
+#if defined(UNIX) || defined(unix)
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>