Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Oct 2023 07:41:46 GMT
From:      Robert Clausecker <fuz@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: f6c3a4092779 - main - net/packetdrill: fix build on armv7, FreeBSD 12
Message-ID:  <202310090741.3997fkmw020141@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by fuz:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f6c3a4092779ca6fc4db3cf5bcb387fa3b268921

commit f6c3a4092779ca6fc4db3cf5bcb387fa3b268921
Author:     Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2023-10-07 04:41:02 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-10-09 07:40:29 +0000

    net/packetdrill: fix build on armv7, FreeBSD 12
    
     - make a symbol new in FreeBSD 13 optional
     - mark a union as packed that will require unaligned access
     - define TEST_TARGET
    
    Approved by:    portmgr (build fix blanket)
    MFH:            2023Q4
---
 net/packetdrill/Makefile                       |  6 ++----
 net/packetdrill/files/patch-symbols__freebsd.c | 12 ++++++++++++
 net/packetdrill/files/patch-tcp__options.h     | 11 +++++++++++
 3 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/net/packetdrill/Makefile b/net/packetdrill/Makefile
index 7b9e5ec9c2ed..eb1e1234c9d4 100644
--- a/net/packetdrill/Makefile
+++ b/net/packetdrill/Makefile
@@ -8,8 +8,6 @@ WWW=		https://github.com/freebsd-net/packetdrill
 
 LICENSE=	GPLv2
 
-IGNORE_FreeBSD_12=	does not build
-
 USES=		bison python:run uidfix
 USE_GITHUB=	yes
 GH_ACCOUNT=	freebsd-net
@@ -24,12 +22,12 @@ OPTIONS_DEFINE=	DOCS EXAMPLES
 
 # XXX Static libraries with PIE are currently unsupported.
 MAKE_ARGS+=	WITHOUT_PIE=true
-
+TEST_TARGET=	tests
 # 'MD5_Init' is deprecated on OpenSSL 3
 CFLAGS+=	-Wno-deprecated
 
 pre-build:
-	cd ${WRKSRC} && ${LN} Makefile.FreeBSD Makefile
+	cd ${WRKSRC} && ${LN} -f Makefile.FreeBSD Makefile
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
diff --git a/net/packetdrill/files/patch-symbols__freebsd.c b/net/packetdrill/files/patch-symbols__freebsd.c
new file mode 100644
index 000000000000..25950fcd0277
--- /dev/null
+++ b/net/packetdrill/files/patch-symbols__freebsd.c
@@ -0,0 +1,12 @@
+--- symbols_freebsd.c.orig	2023-10-07 04:37:59 UTC
++++ symbols_freebsd.c
+@@ -406,7 +406,9 @@ struct int_symbol platform_symbols_table[] = {
+ 	{ TCP_NOOPT,                        "TCP_NOOPT"                       },
+ 	{ TCP_MD5SIG,                       "TCP_MD5SIG"                      },
+ 	{ TCP_INFO,                         "TCP_INFO"                        },
++#if defined(TCP_STATS)
+ 	{ TCP_STATS,                        "TCP_STATS"                       },
++#endif
+ #if defined(TCP_LOG)
+ 	{ TCP_LOG,                          "TCP_LOG"                         },
+ #endif
diff --git a/net/packetdrill/files/patch-tcp__options.h b/net/packetdrill/files/patch-tcp__options.h
new file mode 100644
index 000000000000..a151a453fc98
--- /dev/null
+++ b/net/packetdrill/files/patch-tcp__options.h
@@ -0,0 +1,11 @@
+--- tcp_options.h.orig	2023-10-07 04:31:15 UTC
++++ tcp_options.h
+@@ -166,7 +166,7 @@ struct tcp_option {
+ 		struct {
+ 			u8 data[MAX_TCP_OPTION_DATA_BYTES];
+ 		} generic;
+-	};
++	} __packed;
+ 	u32 flags;  /* meta information, not going on the wire */
+ } __packed;
+ 



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