diff options
author | Vanilla I. Shu <vanilla@FreeBSD.org> | 2016-02-22 02:40:49 +0000 |
---|---|---|
committer | Vanilla I. Shu <vanilla@FreeBSD.org> | 2016-02-22 02:40:49 +0000 |
commit | 7e60dbfd406948e030f01ad8b845d031dd185326 (patch) | |
tree | ee232856fd5a71635391df6c3dc0223aa95123d8 /astro | |
parent | 87020c8dc37297d498b1e8274193720d82da3795 (diff) | |
download | ports-7e60dbfd406948e030f01ad8b845d031dd185326.tar.gz ports-7e60dbfd406948e030f01ad8b845d031dd185326.zip |
Notes
Diffstat (limited to 'astro')
-rw-r--r-- | astro/xtide/Makefile | 1 | ||||
-rw-r--r-- | astro/xtide/files/patch-xttpd.cc | 34 |
2 files changed, 35 insertions, 0 deletions
diff --git a/astro/xtide/Makefile b/astro/xtide/Makefile index 60eb00155cbf..66cab5ac6098 100644 --- a/astro/xtide/Makefile +++ b/astro/xtide/Makefile @@ -3,6 +3,7 @@ PORTNAME= xtide PORTVERSION= 2.15 +PORTREVISION= 1 CATEGORIES= astro geography MASTER_SITES= ftp://ftp.flaterco.com/xtide/ DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \ diff --git a/astro/xtide/files/patch-xttpd.cc b/astro/xtide/files/patch-xttpd.cc new file mode 100644 index 000000000000..c4539283e85f --- /dev/null +++ b/astro/xtide/files/patch-xttpd.cc @@ -0,0 +1,34 @@ +--- xttpd.cc.orig 2016-01-23 13:26:42 UTC ++++ xttpd.cc +@@ -258,7 +258,21 @@ static void setupSocket (sockaddr_storag + Global::xperror ("setsockopt"); + } + } +- bool bound = (bind(s,(sockaddr *)&addr,sizeof(addr))==0); ++ ++ // 2016-02-21 Manfred Antar reported "bind: Invalid argument" occurring on ++ // FreeBSD and OS X as a regression from 2.14 when trying to bind port ++ // 8080, with or without an explicit address. The only change that should ++ // have been visible to bind is that the size argument got bigger. The ++ // FreeBSD man page for bind states that EINVAL can be raised if "the ++ // addrlen argument is not a valid length for the address family." I guess ++ // this means that apps making use of sockaddr_storage are supposed to lie ++ // about the length. The linux man page similarly states that EINVAL can ++ // be raised if "the addrlen is wrong" but the problem does not reproduce ++ // with my libc. ++ const socklen_t addrlen (addr.ss_family==AF_INET6 ? sizeof(sockaddr_in6) ++ : sizeof(sockaddr_in)); ++ ++ bool bound = (bind(s,(sockaddr *)&addr,addrlen)==0); + int yerrno = errno; + if (!bound && addr.ss_family == AF_INET6) { + +@@ -288,7 +302,7 @@ static void setupSocket (sockaddr_storag + + for (unsigned magic=4; !bound && magic>0; --magic) { + ((sockaddr_in6 *)&addr)->sin6_scope_id = magic; +- bound = (bind(s,(sockaddr *)&addr,sizeof(addr))==0); ++ bound = (bind(s,(sockaddr *)&addr,addrlen)==0); + } + } + // Report the error from the first failure so that it won't be obscured by |