summaryrefslogtreecommitdiff
path: root/package/network/services/wireguard/patches/100-portability.patch
diff options
context:
space:
mode:
Diffstat (limited to 'package/network/services/wireguard/patches/100-portability.patch')
-rw-r--r--package/network/services/wireguard/patches/100-portability.patch15
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 b26d51e..33a7373 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