From owner-svn-ports-all@freebsd.org Fri Aug 5 18:41:23 2016 Return-Path: Delivered-To: svn-ports-all@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 041AEBB0718; Fri, 5 Aug 2016 18:41:23 +0000 (UTC) (envelope-from garga@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 AECFF159C; Fri, 5 Aug 2016 18:41:22 +0000 (UTC) (envelope-from garga@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u75IfLG6093804; Fri, 5 Aug 2016 18:41:21 GMT (envelope-from garga@FreeBSD.org) Received: (from garga@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u75IfLlq093802; Fri, 5 Aug 2016 18:41:21 GMT (envelope-from garga@FreeBSD.org) Message-Id: <201608051841.u75IfLlq093802@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: garga set sender to garga@FreeBSD.org using -f From: Renato Botelho Date: Fri, 5 Aug 2016 18:41:21 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r419703 - in head/net/libpcap: . 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-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Aug 2016 18:41:23 -0000 Author: garga Date: Fri Aug 5 18:41:21 2016 New Revision: 419703 URL: https://svnweb.freebsd.org/changeset/ports/419703 Log: Fix net/libpcap build without IPV6 Obtained from: https://github.com/DragonFlyBSD/DeltaPorts/pull/602 Sponsored by: Rubicon Communications (Netgate) Added: head/net/libpcap/files/patch-gencode.c (contents, props changed) Modified: head/net/libpcap/Makefile Modified: head/net/libpcap/Makefile ============================================================================== --- head/net/libpcap/Makefile Fri Aug 5 18:35:54 2016 (r419702) +++ head/net/libpcap/Makefile Fri Aug 5 18:41:21 2016 (r419703) @@ -3,6 +3,7 @@ PORTNAME= libpcap PORTVERSION= 1.8.0 +PORTREVISION= 1 CATEGORIES= net ipv6 MASTER_SITES= http://www.tcpdump.org/release/ Added: head/net/libpcap/files/patch-gencode.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/libpcap/files/patch-gencode.c Fri Aug 5 18:41:21 2016 (r419703) @@ -0,0 +1,45 @@ +--- gencode.c.orig 2016-07-30 13:42:44 UTC ++++ gencode.c +@@ -523,7 +523,8 @@ static struct block *gen_host6(compiler_ + struct in6_addr *, int, int, int); + #endif + #ifndef INET6 +-static struct block *gen_gateway(const u_char *, bpf_u_int32 **, int, int); ++static struct block *gen_gateway(compiler_state_t *, const u_char *, ++ bpf_u_int32 **, int, int); + #endif + static struct block *gen_ipfrag(compiler_state_t *); + static struct block *gen_portatom(compiler_state_t *, int, bpf_int32); +@@ -690,7 +691,9 @@ pcap_compile(pcap_t *p, struct bpf_progr + } + initchunks(&cstate); + cstate.no_optimize = 0; ++#ifdef INET6 + cstate.ai = NULL; ++#endif + cstate.ic.root = NULL; + cstate.ic.cur_mark = 0; + cstate.bpf_pcap = p; +@@ -4846,11 +4849,8 @@ gen_host6(compiler_state_t *cstate, stru + + #ifndef INET6 + static struct block * +-gen_gateway(eaddr, alist, proto, dir) +- const u_char *eaddr; +- bpf_u_int32 **alist; +- int proto; +- int dir; ++gen_gateway(compiler_state_t *cstate, const u_char *eaddr, ++ bpf_u_int32 **alist, int proto, int dir) + { + struct block *b0, *b1, *tmp; + +@@ -6414,7 +6414,7 @@ gen_scode(compiler_state_t *cstate, cons + alist = pcap_nametoaddr(name); + if (alist == NULL || *alist == NULL) + bpf_error(cstate, "unknown host '%s'", name); +- b = gen_gateway(eaddr, alist, proto, dir); ++ b = gen_gateway(cstate, eaddr, alist, proto, dir); + free(eaddr); + return b; + #else