From e61e061eb18862d8e740adeb80fa00d33e00b57e Mon Sep 17 00:00:00 2001 From: Piotr Kubaj Date: Sat, 14 Nov 2020 03:09:34 +0000 Subject: [PATCH] security/snort2pfcd: fix build on GCC architectures cc1: error: unrecognized command line option "-Wimplicit-fallthrough" cc1: error: unrecognized command line option "-Wcovered-switch-default" cc1: error: unrecognized command line option "-Wno-noexcept-type" cc1: error: unrecognized command line option "-Wstring-conversion" Tested to build with Clang. --- security/snort2pfcd/Makefile | 1 + security/snort2pfcd/files/patch-Makefile | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 security/snort2pfcd/files/patch-Makefile diff --git a/security/snort2pfcd/Makefile b/security/snort2pfcd/Makefile index 599201bd7bb1..71fa4cba08cd 100644 --- a/security/snort2pfcd/Makefile +++ b/security/snort2pfcd/Makefile @@ -14,6 +14,7 @@ LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libcidr.so:devel/libcidr RUN_DEPENDS= snort:security/snort +USES= compiler:c11 USE_RC_SUBR= snort2pfcd PLIST_FILES= man/man8/snort2pfcd.8.gz \ sbin/snort2pfcd diff --git a/security/snort2pfcd/files/patch-Makefile b/security/snort2pfcd/files/patch-Makefile new file mode 100644 index 000000000000..8799c7f6a2aa --- /dev/null +++ b/security/snort2pfcd/files/patch-Makefile @@ -0,0 +1,11 @@ +--- Makefile.orig 2020-11-14 01:58:17 UTC ++++ Makefile +@@ -2,7 +2,7 @@ PROG= snort2pfcd + SRCS= main.c parser.c kevent.c spfc.c tools.c + MAN= ${PROG}.8 + CFLAGS+= -Wall -Wextra -pipe -fno-strict-aliasing -pedantic -pthread -Wno-unused-parameter \ +--Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wstring-conversion \ ++-Wno-long-long -Wimplicit-fallthrough -Wno-noexcept-type \ + -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -D_REENTRANT -D_THREAD_SAFE -D_VERSION="${1}" -I${LOCALBASE}/include + + LDFLAGS+=-lutil -L${LOCALBASE}/lib -lcidr