freebsd-ports/audio/napster/files/patch-nap.c
Patrick Li a7dc96946e Update to 1.5.0
Approved by:	petef(maintainer)
2002-03-25 05:44:08 +00:00

23 lines
586 B
C

--- nap.c.orig Fri Mar 1 11:17:37 2002
+++ nap.c Sat Mar 9 17:24:26 2002
@@ -1987,7 +1987,7 @@
char *buf;
char *p;
int i, r;
- int timeout;
+ int timeout, on = 1;
timeout = nvar_default("connecttimeout", CONNECTTIMEOUT);
@@ -2010,6 +2010,10 @@
wp(wchan, "Error creating socket: %s\n", strerror(errno));
drw(wchan);
return(-1);
+ }
+
+ if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) == -1) {
+ perror("setsockopt(SO_REUSEADDR)");
}
if (connect_t(s, (struct sockaddr *)&dst, sizeof(dst), timeout) == -1) {