aboutsummaryrefslogtreecommitdiff
path: root/net/udpsend~.c
diff options
context:
space:
mode:
authorMartin Peach <mrpeach@users.sourceforge.net>2010-01-11 16:56:07 +0000
committerMartin Peach <mrpeach@users.sourceforge.net>2010-01-11 16:56:07 +0000
commitb7e8b9bc0bf7964833ddf0bc1513600df41f170c (patch)
tree7c3100bf5c1dd2a6624d161e85ac9cc311c9c9e1 /net/udpsend~.c
parent3c3500f54d678cc423d6a7ee82504766b41033d7 (diff)
Added "unix" to the test for "UNIX".
svn path=/trunk/externals/mrpeach/; revision=12955
Diffstat (limited to 'net/udpsend~.c')
-rw-r--r--net/udpsend~.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/net/udpsend~.c b/net/udpsend~.c
index ce9bcad..70a3a7b 100644
--- a/net/udpsend~.c
+++ b/net/udpsend~.c
@@ -39,7 +39,7 @@
#include <sys/types.h>
#include <string.h>
#include <stdlib.h>
-#ifdef UNIX
+#if defined(UNIX) || defined(unix)
#include <sys/socket.h>
#include <errno.h>
#include <netinet/in.h>
@@ -51,7 +51,8 @@
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
-#include <pthread.h>
+#include <pthread.h>
+#include <math.h>
#define SOCKET_ERROR -1
#endif
#ifdef _WIN32
@@ -556,7 +557,7 @@ static void *udpsend_tilde_new(t_floatarg inlets, t_floatarg prot)
x->x_cbufsize = x->x_blocksize * sizeof(t_float) * x->x_ninlets;
x->x_cbuf = (char *)t_getbytes(x->x_cbufsize);
-#ifdef UNIX
+#if defined(UNIX) || defined(unix)
/* we don't want to get signaled in case send() fails */
signal(SIGPIPE, SIG_IGN);
#endif
@@ -626,7 +627,7 @@ static int udpsend_tilde_sockerror(char *s)
#ifdef _WIN32
if (err == WSAEWOULDBLOCK)
#endif
-#ifdef UNIX
+#if defined(UNIX) || defined(unix)
if (err == EAGAIN)
#endif
{
@@ -637,7 +638,7 @@ static int udpsend_tilde_sockerror(char *s)
static void udpsend_tilde_closesocket(int fd)
{
-#ifdef UNIX
+#if defined(UNIX) || defined(unix)
close(fd);
#endif
#ifdef _WIN32