aboutsummaryrefslogtreecommitdiff
path: root/externals
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2012-02-20 18:42:51 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2012-02-20 18:42:51 +0000
commit02a3b685d9b997789412d454d1f4eb942d918709 (patch)
tree59bcb5a1d96504c7fc716be5478a9c789336111d /externals
parent7b65906d1a204c48d2f5a7ca6dad2002fa72b057 (diff)
sync with x_net.c from pure-data.git 0.43-1
svn path=/trunk/; revision=16007
Diffstat (limited to 'externals')
-rw-r--r--externals/vanilla/netreceive.c4
-rw-r--r--externals/vanilla/netsend.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/externals/vanilla/netreceive.c b/externals/vanilla/netreceive.c
index 468bad49..1345587e 100644
--- a/externals/vanilla/netreceive.c
+++ b/externals/vanilla/netreceive.c
@@ -121,6 +121,10 @@ static void *netreceive_new(t_symbol *compatflag,
&intarg, sizeof(intarg)) < 0)
post("setsockopt (SO_RCVBUF) failed\n");
#endif
+ intarg = 1;
+ if(setsockopt(sockfd, SOL_SOCKET, SO_BROADCAST,
+ (const void *)&intarg, sizeof(intarg)) < 0)
+ post("setting SO_BROADCAST");
/* Stream (TCP) sockets are set NODELAY */
if (!udp)
{
diff --git a/externals/vanilla/netsend.c b/externals/vanilla/netsend.c
index e2d15ab2..0b64242f 100644
--- a/externals/vanilla/netsend.c
+++ b/externals/vanilla/netsend.c
@@ -76,6 +76,10 @@ static void netsend_connect(t_netsend *x, t_symbol *hostname,
&intarg, sizeof(intarg)) < 0)
post("setsockopt (SO_RCVBUF) failed\n");
#endif
+ intarg = 1;
+ if(setsockopt(sockfd, SOL_SOCKET, SO_BROADCAST,
+ (const void *)&intarg, sizeof(intarg)) < 0)
+ post("setting SO_BROADCAST");
/* for stream (TCP) sockets, specify "nodelay" */
if (x->x_protocol == SOCK_STREAM)
{