From c48eabf476ac94e096a92a2446b21a6fef6bf334 Mon Sep 17 00:00:00 2001 From: Piotr Kubaj Date: Tue, 23 Mar 2021 18:43:26 +0000 Subject: [PATCH] security/zeek: fix build on powerpc64 elfv2 -mpowerp8-vector is now necessary due to use of highwayhash. Fix typo on sysctlbyname. Also correct typo in BROKEN entries. --- security/zeek/Makefile | 5 +++-- ...ch-auxil_highwayhash_highwayhash_arch__specific.cc | 11 +++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 security/zeek/files/patch-auxil_highwayhash_highwayhash_arch__specific.cc diff --git a/security/zeek/Makefile b/security/zeek/Makefile index 6499e2834073..cdb4f82d46bd 100644 --- a/security/zeek/Makefile +++ b/security/zeek/Makefile @@ -12,14 +12,15 @@ COMMENT= System for detecting network intruders in real-time LICENSE= BSD3CLAUSE -BROKEN_FreeBSD_11_powerpc64== Does not build: error: zero-size array 'names' -BROKEN_FreeBSD_12_powerpc64== Does not build: error: zero-size array 'names' +BROKEN_FreeBSD_11_powerpc64= Does not build: error: zero-size array 'names' +BROKEN_FreeBSD_12_powerpc64= Does not build: error: zero-size array 'names' USES= bison cmake compiler:c++11-lang gettext-runtime ninja perl5 python shebangfix ssl USE_LDCONFIG= yes PORTSCOUT= limit:0,even +CXXFLAGS_powerpc64= -mpower8-vector CMAKE_ARGS+= -DPYTHON_EXECUTABLE:PATH=${PYTHON_CMD} SHEBANG_FILES= auxil/zeekctl/auxil/trace-summary/trace-summary diff --git a/security/zeek/files/patch-auxil_highwayhash_highwayhash_arch__specific.cc b/security/zeek/files/patch-auxil_highwayhash_highwayhash_arch__specific.cc new file mode 100644 index 000000000000..eda7565aad24 --- /dev/null +++ b/security/zeek/files/patch-auxil_highwayhash_highwayhash_arch__specific.cc @@ -0,0 +1,11 @@ +--- auxil/highwayhash/highwayhash/arch_specific.cc.orig 2021-03-23 17:45:40 UTC ++++ auxil/highwayhash/highwayhash/arch_specific.cc +@@ -150,7 +150,7 @@ double DetectNominalClockRate() { + } + #elif __FreeBSD__ + size_t length = sizeof(freq); +- sysctlbyname("dev.cpu.0.freq"), &freq, &length, NULL, 0); ++ sysctlbyname("dev.cpu.0.freq", &freq, &length, NULL, 0); + freq *= 1E6; + return freq; + #endif