From owner-svn-src-vendor@freebsd.org Wed Mar 29 03:28:10 2017 Return-Path: Delivered-To: svn-src-vendor@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 C8DE2D22E2A; Wed, 29 Mar 2017 03:28:10 +0000 (UTC) (envelope-from delphij@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 7210F2FDD; Wed, 29 Mar 2017 03:28:10 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2T3S9Tm042270; Wed, 29 Mar 2017 03:28:09 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2T3S91r042269; Wed, 29 Mar 2017 03:28:09 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201703290328.v2T3S91r042269@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 29 Mar 2017 03:28:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r316124 - vendor/libpcap/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Mar 2017 03:28:10 -0000 Author: delphij Date: Wed Mar 29 03:28:09 2017 New Revision: 316124 URL: https://svnweb.freebsd.org/changeset/base/316124 Log: Apply vendor revision 470df104c6f55f6d6f390df7448d8eb65c7642b9: From: Guy Harris Subject: [PATCH] Fix compilation if INET6 isn't defined. Addresses GitHub issue #541, but differently from the pull request (it defines gen_gateway() with a function prototype rather than using a pre-prototype-style definition). Modified: vendor/libpcap/dist/gencode.c Modified: vendor/libpcap/dist/gencode.c ============================================================================== --- vendor/libpcap/dist/gencode.c Wed Mar 29 02:21:05 2017 (r316123) +++ vendor/libpcap/dist/gencode.c Wed Mar 29 03:28:09 2017 (r316124) @@ -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; @@ -4902,11 +4905,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; @@ -6470,7 +6470,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