zerotier: fix system include path
authorLiangbin Lian <[email protected]>
Tue, 10 Jun 2025 03:03:13 +0000 (11:03 +0800)
committerJosef Schlehofer <[email protected]>
Wed, 11 Jun 2025 14:15:21 +0000 (16:15 +0200)
`-isystem ext` makes `#include <miniupnpc/miniupnpc.h>` actually include `ext/miniupnpc/miniupnpc.h`.

we should use `$(STAGING_DIR)/usr/include` as a higher priority system include path.

Fix https://github.com/openwrt/openwrt/issues/18019

Signed-off-by: Liangbin Lian <[email protected]>
net/zerotier/Makefile

index bc19eaa7c2461df596671ec43002968face58a91..41975d505cc89d6942553f69bef8e40547113658 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=zerotier
 PKG_VERSION:=1.14.1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/zerotier/ZeroTierOne/tar.gz/$(PKG_VERSION)?
@@ -62,6 +62,9 @@ endef
 TARGET_CFLAGS += -Wl,-z,noexecstack
 TARGET_LDFLAGS += -Wl,--as-needed -Wl,-z,noexecstack
 
+# Prevent `-isystem ext` from causing the wrong miniupnpc header to be used (OpenWrt packages issue - 18019)
+TARGET_CFLAGS += -isystem $(STAGING_DIR)/usr/include
+
 define Package/zerotier/conffiles
 /etc/config/zerotier
 endef