`-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]>
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)?
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