aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Clausecker <fuz@FreeBSD.org>2023-04-19 12:10:57 +0000
committerRobert Clausecker <fuz@FreeBSD.org>2023-04-20 11:49:22 +0000
commit289d41817be3eb14823fb9b550dd0e1186f654b8 (patch)
tree3454586a2c87080496647b553f49efc703593e3a
parent221dac0087ec47c24c00074a6c66479cae9c227b (diff)
downloadports-289d41817be3eb14823fb9b550dd0e1186f654b8.tar.gz
ports-289d41817be3eb14823fb9b550dd0e1186f654b8.zip
net/pkt-gen: fix on 32 bit platforms (again)
Exorcise -Werror for the third time. Re-add patches needed to build on 32 bit platforms. Please don't remove patches without understanding them first. Fixes: 9305cd3f9321bfba95479b2b2a15c7639a790383 PR: 270440 See also: PR 264561, 230623 Approved by: portmgr (build fix blanket)
-rw-r--r--net/pkt-gen/Makefile4
-rw-r--r--net/pkt-gen/files/patch-apps_nmreplay_GNUmakefile12
-rw-r--r--net/pkt-gen/files/patch-apps_pkt-gen_GNUmakefile12
-rw-r--r--net/pkt-gen/files/patch-apps_pkt-gen_pkt-gen.c13
-rw-r--r--net/pkt-gen/files/patch-libnetmap_GNUmakefile11
5 files changed, 49 insertions, 3 deletions
diff --git a/net/pkt-gen/Makefile b/net/pkt-gen/Makefile
index e02534d447e2..35bc8e6570a1 100644
--- a/net/pkt-gen/Makefile
+++ b/net/pkt-gen/Makefile
@@ -1,5 +1,6 @@
PORTNAME= pkt-gen
PORTVERSION= g2023.03.22
+PORTREVISION= 1
CATEGORIES= net
MAINTAINER= olivier@FreeBSD.org
@@ -8,9 +9,6 @@ WWW= https://github.com/luigirizzo/netmap
LICENSE= BSD2CLAUSE
-NOT_FOR_ARCHS= armv6 armv7 i386 mips powerpc
-NOT_FOR_ARCHS_REASON= build error with time_t type on 32bit platforms
-
USES= gmake
USE_GITHUB= yes
GH_ACCOUNT= luigirizzo
diff --git a/net/pkt-gen/files/patch-apps_nmreplay_GNUmakefile b/net/pkt-gen/files/patch-apps_nmreplay_GNUmakefile
new file mode 100644
index 000000000000..01f487791835
--- /dev/null
+++ b/net/pkt-gen/files/patch-apps_nmreplay_GNUmakefile
@@ -0,0 +1,12 @@
+--- apps/nmreplay/GNUmakefile.orig 2022-02-11 07:45:02 UTC
++++ apps/nmreplay/GNUmakefile
+@@ -10,7 +10,8 @@ VPATH = $(SRCDIR)/apps/nmreplay
+
+ NO_MAN=
+ CFLAGS = -O2 # -pipe -g
+-CFLAGS += -Werror -Wall -Wunused-function
++CFLAGS += -Wall -Wunused-function
++CFLAGS += -Wall -Wunused-function
+ CFLAGS += -I $(SRCDIR)/sys -I $(SRCDIR)/apps/include -I $(SRCDIR)/libnetmap
+ CFLAGS += -Wextra
+
diff --git a/net/pkt-gen/files/patch-apps_pkt-gen_GNUmakefile b/net/pkt-gen/files/patch-apps_pkt-gen_GNUmakefile
new file mode 100644
index 000000000000..f401d30bd9e8
--- /dev/null
+++ b/net/pkt-gen/files/patch-apps_pkt-gen_GNUmakefile
@@ -0,0 +1,12 @@
+--- apps/pkt-gen/GNUmakefile.orig 2022-02-11 07:45:02 UTC
++++ apps/pkt-gen/GNUmakefile
+@@ -10,7 +10,8 @@ VPATH = $(SRCDIR)/apps/pkt-gen
+
+ NO_MAN=
+ CFLAGS = -O2 -pipe
+-CFLAGS += -Werror -Wall -Wunused-function
++CFLAGS += -Wall -Wunused-function
++CFLAGS += -Wall -Wunused-function
+ CFLAGS += -I $(SRCDIR)/sys -I $(SRCDIR)/apps/include -I $(SRCDIR)/libnetmap
+ CFLAGS += -Wextra -Wno-address-of-packed-member
+
diff --git a/net/pkt-gen/files/patch-apps_pkt-gen_pkt-gen.c b/net/pkt-gen/files/patch-apps_pkt-gen_pkt-gen.c
new file mode 100644
index 000000000000..b059e6c79370
--- /dev/null
+++ b/net/pkt-gen/files/patch-apps_pkt-gen_pkt-gen.c
@@ -0,0 +1,13 @@
+--- apps/pkt-gen/pkt-gen.c.orig 2022-06-08 23:21:01 UTC
++++ apps/pkt-gen/pkt-gen.c
+@@ -3251,8 +3251,8 @@ out:
+ g.tx_period.tv_nsec = g.tx_period.tv_nsec % 1000000000;
+ }
+ if (g.td_type == TD_TYPE_SENDER)
+- D("Sending %d packets every %ld.%09ld s",
+- g.burst, g.tx_period.tv_sec, g.tx_period.tv_nsec);
++ D("Sending %d packets every %lld.%09ld s",
++ g.burst, (long long)g.tx_period.tv_sec, g.tx_period.tv_nsec);
+ /* Install ^C handler. */
+ global_nthreads = g.nthreads;
+ sigemptyset(&ss);
diff --git a/net/pkt-gen/files/patch-libnetmap_GNUmakefile b/net/pkt-gen/files/patch-libnetmap_GNUmakefile
new file mode 100644
index 000000000000..ba04a18d3b2d
--- /dev/null
+++ b/net/pkt-gen/files/patch-libnetmap_GNUmakefile
@@ -0,0 +1,11 @@
+--- libnetmap/GNUmakefile.orig 2022-02-11 07:45:02 UTC
++++ libnetmap/GNUmakefile
+@@ -1,6 +1,7 @@
+ SRCDIR ?= ../
+ PREFIX ?= usr/local
+-CFLAGS=-O2 -pipe -Wall -Werror
++CFLAGS=-O2 -pipe -Wall
++CFLAGS=-O2 -pipe -Wall
+ CFLAGS +=-g
+ CFLAGS += -I $(SRCDIR)/sys
+ VPATH = $(SRCDIR)/libnetmap