diff options
author | Robert Clausecker <fuz@fuz.su> | 2022-08-02 04:56:16 +0000 |
---|---|---|
committer | Neel Chauhan <nc@FreeBSD.org> | 2022-08-04 19:52:09 +0000 |
commit | e93cb96a07d574708cb409696ba1257c16de32f0 (patch) | |
tree | d0bbe00458967f5b48f9a6efb2940e22a89e48f9 | |
parent | c58b3d0f8ba257e79f6fa9965f96f507cf851883 (diff) | |
download | ports-e93cb96a07d574708cb409696ba1257c16de32f0.tar.gz ports-e93cb96a07d574708cb409696ba1257c16de32f0.zip |
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>
-rw-r--r-- | security/masscan/files/patch-src_out-tcp-services.c | 10 | ||||
-rw-r--r-- | security/masscan/files/patch-src_smack1.c | 3 |
2 files changed, 12 insertions, 1 deletions
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; |