patch to fix pkt-gen

From: John-Mark Gurney <jmg_at_funkthat.com>
Date: Sat, 31 Jul 2021 11:45:45 -0700
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
_at__at_ -1,13 +1,14 _at__at_
---- 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
 _at__at_ -10,9 +10,8 _at__at_ 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."

Received on Sat Jul 31 2021 - 18:45:45 UTC

Original text of this message