4ff23afdcc
52be69b version: bump snapshot 4884b45 ncat-client-server: add wg-quick variant a333551 wg-quick: add darwin implementation f5bf84d compat: backport for OpenSUSE 15 fe1ae1b wg-quick: add wg symlink ecc1c5f wg-quick: add android implementation 3e6bb79 tools: reorganize for multiplatform wg-quick b289d12 allowedips: Fix graphviz output after endianness patch Refresh cross compile compatibility patch Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
19 lines
481 B
Diff
19 lines
481 B
Diff
tools: fix portability issue
|
|
|
|
Check if the compiler defines __linux__, instead of assuming that the
|
|
host OS is the same as the target OS.
|
|
|
|
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
---
|
|
--- a/src/tools/Makefile
|
|
+++ b/src/tools/Makefile
|
|
@@ -36,6 +36,9 @@ endif
|
|
endif
|
|
|
|
PLATFORM ?= $(shell uname -s | tr '[:upper:]' '[:lower:]')
|
|
+ifeq ($(strip $(shell echo __linux__ | $(CC) -E - | grep -v '^\#')),1)
|
|
+PLATFORM := linux
|
|
+endif
|
|
|
|
CFLAGS ?= -O3
|
|
CFLAGS += -std=gnu11 -D_GNU_SOURCE
|