aboutsummaryrefslogtreecommitdiff
path: root/modules/pdp_i.c
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2006-12-14 06:03:31 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2006-12-14 06:03:31 +0000
commitf9f5be77646dc69989ed840e70e2b4cb452a76e5 (patch)
treec83253ebbb8783c37e197ce8b13669a790282aab /modules/pdp_i.c
parent34a5c986ebab45f06258b6da12e0258ad570a67b (diff)
merged in fixes from branch-v0-39-2-extended so that it builds on Mac OS X, and works better with the Pd-extended build system
svn path=/trunk/externals/pidip/; revision=6886
Diffstat (limited to 'modules/pdp_i.c')
-rw-r--r--modules/pdp_i.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/pdp_i.c b/modules/pdp_i.c
index 6971f16..790db5c 100644
--- a/modules/pdp_i.c
+++ b/modules/pdp_i.c
@@ -46,6 +46,10 @@ extern void sys_addpollfn(int fd, t_fdpollfn fn, void *ptr);
#define SOCKET_ERROR -1
#define INPUT_BUFFER_SIZE 1048578 /* 1 M */
+#ifndef MSG_NOSIGNAL
+# define MSG_NOSIGNAL SO_NOSIGPIPE
+#endif
+
/* time-out used for select() call */
static struct timeval ztout;
@@ -68,7 +72,7 @@ void pdp_i_closesocket(int fd)
int pdp_i_setsocketoptions(int sockfd)
{
int sockopt = 1;
- if (setsockopt(sockfd, SOL_TCP, TCP_NODELAY, (const char*) &sockopt, sizeof(int)) < 0)
+ if (setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, (const char*) &sockopt, sizeof(int)) < 0)
{
post("pdp_i : setsockopt TCP_NODELAY failed");
perror( "setsockopt" );