From f9f5be77646dc69989ed840e70e2b4cb452a76e5 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Thu, 14 Dec 2006 06:03:31 +0000 Subject: 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 --- modules/pdp_i.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'modules/pdp_i.c') 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" ); -- cgit v1.2.1