From owner-svn-ports-head@freebsd.org Mon Feb 22 02:40:51 2016 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F142AAFA1E; Mon, 22 Feb 2016 02:40:51 +0000 (UTC) (envelope-from vanilla@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 205901226; Mon, 22 Feb 2016 02:40:51 +0000 (UTC) (envelope-from vanilla@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u1M2eotw074574; Mon, 22 Feb 2016 02:40:50 GMT (envelope-from vanilla@FreeBSD.org) Received: (from vanilla@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u1M2eoj6074572; Mon, 22 Feb 2016 02:40:50 GMT (envelope-from vanilla@FreeBSD.org) Message-Id: <201602220240.u1M2eoj6074572@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vanilla set sender to vanilla@FreeBSD.org using -f From: "Vanilla I. Shu" Date: Mon, 22 Feb 2016 02:40:50 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r409315 - in head/astro/xtide: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2016 02:40:51 -0000 Author: vanilla Date: Mon Feb 22 02:40:49 2016 New Revision: 409315 URL: https://svnweb.freebsd.org/changeset/ports/409315 Log: 1: Add a patch from upstream to fix bind issue. 2: Bump version. Obtained from: Manfred Antar Added: head/astro/xtide/files/ head/astro/xtide/files/patch-xttpd.cc (contents, props changed) Modified: head/astro/xtide/Makefile Modified: head/astro/xtide/Makefile ============================================================================== --- head/astro/xtide/Makefile Mon Feb 22 01:59:42 2016 (r409314) +++ head/astro/xtide/Makefile Mon Feb 22 02:40:49 2016 (r409315) @@ -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} \ Added: head/astro/xtide/files/patch-xttpd.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/astro/xtide/files/patch-xttpd.cc Mon Feb 22 02:40:49 2016 (r409315) @@ -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