From owner-freebsd-current@FreeBSD.ORG Tue Oct 29 04:19:55 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 293F48AC for ; Tue, 29 Oct 2013 04:19:55 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B79E62637 for ; Tue, 29 Oct 2013 04:19:53 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id r9T4Jbe5033786; Tue, 29 Oct 2013 08:19:37 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id r9T4Jask033785; Tue, 29 Oct 2013 08:19:37 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 29 Oct 2013 08:19:36 +0400 From: Gleb Smirnoff To: dt71@gmx.com Subject: Re: buildworld failure: pfvar.h:44 #include not found Message-ID: <20131029041936.GR52889@glebius.int.ru> References: <526EE1E1.6090905@gmx.com> <20131028223334.GE52889@FreeBSD.org> <526F0306.6080702@gmx.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ngPZezdD7QsvFaqQ" Content-Disposition: inline In-Reply-To: <526F0306.6080702@gmx.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Oct 2013 04:19:55 -0000 --ngPZezdD7QsvFaqQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Oct 29, 2013 at 01:36:22AM +0100, dt71@gmx.com wrote: d> Gleb Smirnoff wrote, On 10/28/2013 23:33: d> > Can you please test attached patch? d> d> Progress: d> ===> usr.bin/netstat (depend) d> rm -f .depend d> CC='/i/a/clang --sysroot=/usr/obj/usr/src/tmp -B/usr/obj/usr/src/tmp/usr/bin' mkdep -f .depend -a -DIPSEC -DSCTP -DINET -DNDEBUG -std=gnu99 /usr/src/usr.bin/netstat/if.c /usr/src/usr.bin/netstat/inet.c /usr/src/usr.bin/netstat/main.c /usr/src/usr.bin/netstat/mbuf.c /usr/src/usr.bin/netstat/mroute.c /usr/src/usr.bin/netstat/netisr.c /usr/src/usr.bin/netstat/route.c /usr/src/usr.bin/netstat/unix.c /usr/src/usr.bin/netstat/atalk.c /usr/src/usr.bin/netstat/mroute6.c /usr/src/usr.bin/netstat/ipsec.c /usr/src/usr.bin/netstat/bpf.c /usr/src/usr.bin/netstat/pfkey.c /usr/src/usr.bin/netstat/sctp.c d> In file included from /usr/src/usr.bin/netstat/if.c:51: d> /usr/obj/usr/src/tmp/usr/include/net/pfvar.h:44:10: fatal error: d> 'netpfil/pf/pf.h' file not found d> #include d> ^ +1 patch. -- Totus tuus, Glebius. --ngPZezdD7QsvFaqQ Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="netstat.diff" Index: usr.bin/netstat/Makefile =================================================================== --- usr.bin/netstat/Makefile (revision 257269) +++ usr.bin/netstat/Makefile (working copy) @@ -26,6 +26,10 @@ CFLAGS+=-DINET6 CFLAGS+=-DSDP .endif +.if ${MK_PF} != "no" +CFLAGS+=-DPF +.endif + BINGRP= kmem BINMODE=2555 DPADD= ${LIBKVM} ${LIBMEMSTAT} ${LIBUTIL} Index: usr.bin/netstat/if.c =================================================================== --- usr.bin/netstat/if.c (revision 257269) +++ usr.bin/netstat/if.c (working copy) @@ -48,13 +48,15 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include #include #include #include #include #include +#ifdef PF +#include +#include +#endif #include #include @@ -80,6 +82,7 @@ static void sidewaysintpr(int); static char addr_buf[NI_MAXHOST]; /* for getnameinfo() */ #endif +#ifdef PF static const char* pfsyncacts[] = { /* PFSYNC_ACT_CLR */ "clear all request", /* PFSYNC_ACT_INS */ "state insert", @@ -154,6 +157,7 @@ pfsync_stats(u_long off, const char *name, int af1 p(pfsyncs_oerrors, "\t\t%ju send error%s\n"); #undef p } +#endif /* PF */ /* * Display a formatted value, or a '-' in the same space. Index: usr.bin/netstat/main.c =================================================================== --- usr.bin/netstat/main.c (revision 257269) +++ usr.bin/netstat/main.c (working copy) @@ -214,8 +214,10 @@ struct protox { pim_stats, NULL, "pim", 1, IPPROTO_PIM }, { -1, N_CARPSTAT, 1, NULL, carp_stats, NULL, "carp", 1, 0 }, +#ifdef PF { -1, N_PFSYNCSTAT, 1, NULL, pfsync_stats, NULL, "pfsync", 1, 0 }, +#endif { -1, N_ARPSTAT, 1, NULL, arp_stats, NULL, "arp", 1, 0 }, { -1, -1, 0, NULL, --ngPZezdD7QsvFaqQ--