Date: Sat, 31 Jul 2021 11:45:45 -0700 From: John-Mark Gurney <jmg@funkthat.com> To: freebsd-ports@FreeBSD.org Subject: patch to fix pkt-gen Message-ID: <20210731184545.GA41029@funkthat.com>
next in thread | raw e-mail | index | archive | help
--CUfgB8w4ZwR/yMy5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline pkt-gen by default compiles against headers that it ships with. This is likely to deal w/ Linux, but now that FreeBSD has rev'd the API a few times, it fails to work on FreeBSD, instead, giving you this: 360.000574 [ 376] netmap_ioctl_legacy Minimum supported API is 14 (requested 11) This drops the inclusion of the header files when building pkt-gen, so that it uses the correct FreeBSD kernel headers. I have done basic testing, and pkt-gen is working. Note, that this does not update pkt-gen to the latest in github, and it is almost 4 years out of date. I can commit it (I think, I haven't used a ports bit in years) if someone wants to approve it, or someone else can commit it for me. I have included it both inline and attached, in case there are problems w/ either. patch: diff --git a/net/pkt-gen/files/patch-pkt-gen_GNUmakefile b/net/pkt-gen/files/patch-pkt-gen_GNUmakefile index 5237c3d4d3c7..e4a1d15abb4c 100644 --- a/net/pkt-gen/files/patch-pkt-gen_GNUmakefile +++ b/net/pkt-gen/files/patch-pkt-gen_GNUmakefile @@ -1,13 +1,14 @@ ---- pkt-gen/GNUmakefile.orig 2018-08-15 02:22:27 UTC +--- pkt-gen/GNUmakefile.orig 2017-08-06 18:26:36 UTC +++ pkt-gen/GNUmakefile @@ -10,9 +10,8 @@ VPATH = $(SRCDIR)/apps/pkt-gen NO_MAN= CFLAGS = -O2 -pipe -CFLAGS += -Werror -Wall -Wunused-function -+CFLAGS += -Wunused-function - CFLAGS += -I $(SRCDIR)/sys -I $(SRCDIR)/apps/include +-CFLAGS += -I $(SRCDIR)/sys -I $(SRCDIR)/apps/include -CFLAGS += -Wextra ++CFLAGS += -Wunused-function ++CFLAGS += -I $(SRCDIR)/apps/include LDLIBS += -lpthread -lm ifeq ($(shell uname),Linux) -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." --CUfgB8w4ZwR/yMy5 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="pkt-gen.diff" diff --git a/net/pkt-gen/files/patch-pkt-gen_GNUmakefile b/net/pkt-gen/files/patch-pkt-gen_GNUmakefile index 5237c3d4d3c7..e4a1d15abb4c 100644 --- a/net/pkt-gen/files/patch-pkt-gen_GNUmakefile +++ b/net/pkt-gen/files/patch-pkt-gen_GNUmakefile @@ -1,13 +1,14 @@ ---- pkt-gen/GNUmakefile.orig 2018-08-15 02:22:27 UTC +--- pkt-gen/GNUmakefile.orig 2017-08-06 18:26:36 UTC +++ pkt-gen/GNUmakefile @@ -10,9 +10,8 @@ VPATH = $(SRCDIR)/apps/pkt-gen NO_MAN= CFLAGS = -O2 -pipe -CFLAGS += -Werror -Wall -Wunused-function -+CFLAGS += -Wunused-function - CFLAGS += -I $(SRCDIR)/sys -I $(SRCDIR)/apps/include +-CFLAGS += -I $(SRCDIR)/sys -I $(SRCDIR)/apps/include -CFLAGS += -Wextra ++CFLAGS += -Wunused-function ++CFLAGS += -I $(SRCDIR)/apps/include LDLIBS += -lpthread -lm ifeq ($(shell uname),Linux) --CUfgB8w4ZwR/yMy5--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20210731184545.GA41029>