1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Fix ndpi-netfilter compilation on all platforms

This commit is contained in:
Ycarus (Yannick Chabanois) 2023-05-16 14:01:23 +02:00
parent dfaa6ba1f0
commit 9c1c926ad4
2 changed files with 7 additions and 9 deletions

View file

@ -20,6 +20,8 @@ PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_URL:=https://github.com/vel21ripn/nDPI.git
PKG_SOURCE_VERSION:=$(PKG_REV)
PKG_BUILD_PARALLEL:=0
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk

View file

@ -1,17 +1,13 @@
--- a/ndpi-netfilter/src/Makefile 2022-08-03 21:27:52.321058402 +0200
+++ b/ndpi-netfilter/src/Makefile 2022-08-03 21:28:27.572452447 +0200
@@ -5,6 +5,14 @@
@@ -5,6 +5,10 @@
ccflags-y += -I${src}/${NDPI_SRC}/include -I${src}/${NDPI_SRC}/lib -I${src}/../libre -I${src}/${NDPI_SRC}/lib/third_party/include
ccflags-y += -DHAVE_CONFIG_H -DNDPI_LIB_COMPILATION -DOPENDPI_NETFILTER_MODULE -DNDPI_DETECTION_SUPPORT_IPV6 -g
ccflags-y += -Wno-declaration-after-statement
+ifneq ($(KERNEL_RELEASE),5.4)
+ifeq ($(ARCH),arm64)
+ ccflags-y += -mno-outline-atomics
+endif
+ifeq ($(ARCH),aarch64)
+ ccflags-y += -mno-outline-atomics
+endif
+endif
+cc-option = $(shell if $(CC) -Werror $(1) -S -o /dev/null -xc /dev/null \
+ > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
+mno_outline_atomics := $(call cc-option, -mno-outline-atomics, "")
+ccflags-y += $(mno_outline_atomics)
#ccflags-y += -Wshadow-local
# Needed for pahole
#ccflags-y += -femit-struct-debug-detailed=any