diff options
Diffstat (limited to 'package/network/services/wireguard/patches')
-rw-r--r-- | package/network/services/wireguard/patches/100-portability.patch | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/package/network/services/wireguard/patches/100-portability.patch b/package/network/services/wireguard/patches/100-portability.patch index b26d51ebd8..33a7373cc7 100644 --- a/package/network/services/wireguard/patches/100-portability.patch +++ b/package/network/services/wireguard/patches/100-portability.patch @@ -7,12 +7,13 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> --- --- a/src/tools/Makefile +++ b/src/tools/Makefile -@@ -43,7 +43,7 @@ CFLAGS += -DRUNSTATEDIR="\"$(RUNSTATEDIR - ifeq ($(DEBUG_TOOLS),y) - CFLAGS += -g +@@ -36,6 +36,9 @@ endif endif --ifeq ($(shell uname -s),Linux) + + PLATFORM ?= $(shell uname -s | tr '[:upper:]' '[:lower:]') +ifeq ($(strip $(shell echo __linux__ | $(CC) -E - | grep -v '^\#')),1) - LIBMNL_CFLAGS := $(shell $(PKG_CONFIG) --cflags libmnl 2>/dev/null) - LIBMNL_LDLIBS := $(shell $(PKG_CONFIG) --libs libmnl 2>/dev/null || echo -lmnl) - CFLAGS += $(LIBMNL_CFLAGS) ++PLATFORM := linux ++endif + + CFLAGS ?= -O3 + CFLAGS += -std=gnu11 -D_GNU_SOURCE |