diff options
author | Robert Clausecker <fuz@FreeBSD.org> | 2023-10-07 04:41:02 +0000 |
---|---|---|
committer | Robert Clausecker <fuz@FreeBSD.org> | 2023-10-09 07:43:11 +0000 |
commit | b9fc607fe060f838a03bf1cc5fe29bc558e26d0d (patch) | |
tree | b927dae54e9332ce7ea3f18810a0320592a9c22b | |
parent | 80ad9147dc70f9fd7725e2a94c1664b391f89ec8 (diff) | |
download | ports-b9fc607fe060f838a03bf1cc5fe29bc558e26d0d.tar.gz ports-b9fc607fe060f838a03bf1cc5fe29bc558e26d0d.zip |
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
(cherry picked from commit f6c3a4092779ca6fc4db3cf5bcb387fa3b268921)
-rw-r--r-- | net/packetdrill/Makefile | 6 | ||||
-rw-r--r-- | net/packetdrill/files/patch-symbols__freebsd.c | 12 | ||||
-rw-r--r-- | 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; + |