git: 9c24af4c6609 - 2022Q3 - security/masscan: fix build on armv7
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 04 Aug 2022 19:53:26 UTC
The branch 2022Q3 has been updated by nc:
URL: https://cgit.FreeBSD.org/ports/commit/?id=9c24af4c660962a2ed4b33bc625a926a740d4413
commit 9c24af4c660962a2ed4b33bc625a926a740d4413
Author: Robert Clausecker <fuz@fuz.su>
AuthorDate: 2022-08-02 04:56:16 +0000
Commit: Neel Chauhan <nc@FreeBSD.org>
CommitDate: 2022-08-04 19:53:16 +0000
security/masscan: fix build on armv7
- fix armv6/armv7 rdtsc patch
- add a missing include file
PR: 265567
Approved by: taguchi.ch AT gmail DOT com <maintainer>
(cherry picked from commit e93cb96a07d574708cb409696ba1257c16de32f0)
---
security/masscan/files/patch-src_out-tcp-services.c | 10 ++++++++++
security/masscan/files/patch-src_smack1.c | 3 ++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/security/masscan/files/patch-src_out-tcp-services.c b/security/masscan/files/patch-src_out-tcp-services.c
new file mode 100644
index 000000000000..2e3926af3812
--- /dev/null
+++ b/security/masscan/files/patch-src_out-tcp-services.c
@@ -0,0 +1,10 @@
+--- src/out-tcp-services.c.orig 2022-08-02 04:53:49 UTC
++++ src/out-tcp-services.c
+@@ -1,6 +1,7 @@
+ #include "out-tcp-services.h"
+ #include <string.h>
+ #include <stdlib.h>
++#include <arpa/inet.h>
+
+ #ifndef WIN32
+ #include <netdb.h>
diff --git a/security/masscan/files/patch-src_smack1.c b/security/masscan/files/patch-src_smack1.c
index 909d256435cf..e88a20706b8b 100644
--- a/security/masscan/files/patch-src_smack1.c
+++ b/security/masscan/files/patch-src_smack1.c
@@ -6,8 +6,9 @@
#include <machine/cpufunc.h>
-#define __rdtsc rdtsc
-#if (__ARM_ARCH >= 6) // V6 is the earliest arch that has a standard cyclecount
+-unsigned long long rdtsc(void)
+#if (__ARM_ARCH >= 6 && __ARM_ARCH <= 7) // V6 is the earliest arch that has a standard cyclecount
- unsigned long long rdtsc(void)
++unsigned long long __rdtsc(void)
{
uint32_t pmccntr;
uint32_t pmuseren;