Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Oct 2013 08:19:36 +0400
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        dt71@gmx.com
Cc:        freebsd-current@freebsd.org
Subject:   Re: buildworld failure: pfvar.h:44 #include <netpfil/pf/pf.h> not found
Message-ID:  <20131029041936.GR52889@glebius.int.ru>
In-Reply-To: <526F0306.6080702@gmx.com>
References:  <526EE1E1.6090905@gmx.com> <20131028223334.GE52889@FreeBSD.org> <526F0306.6080702@gmx.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--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 <netpfil/pf/pf.h>
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 <net/if_dl.h>
 #include <net/if_types.h>
 #include <net/ethernet.h>
-#include <net/pfvar.h>
-#include <net/if_pfsync.h>
 #include <netinet/in.h>
 #include <netinet/in_var.h>
 #include <netipx/ipx.h>
 #include <netipx/ipx_if.h>
 #include <arpa/inet.h>
+#ifdef PF
+#include <net/pfvar.h>
+#include <net/if_pfsync.h>
+#endif
 
 #include <err.h>
 #include <errno.h>
@@ -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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131029041936.GR52889>