From 43269ecf0178483968f2ed05af7cb1d63f345fda Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Mon, 5 Jun 2017 13:41:00 -0700 Subject: [PATCH] klish: Fix build errors with external toolchains We would first not be able to properly detect libxml2 because it's not automatically found, fix that by explicitly linking against it (and zlib a dependency). Then if we don't don't define X_OPEN_SOURCE=500, we would run into the following build error: clish/shell/shell_execute.c: In function 'clish_shell_exec_action': clish/shell/shell_execute.c:309:18: error: 'sigignore' undeclared (first use in this function) sa.sa_handler = sigignore; /* Empty signal handler */ ^ clish/shell/shell_execute.c:309:18: note: each undeclared identifier is reported only once for each function it appears in Signed-off-by: Florian Fainelli --- utils/klish/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/utils/klish/Makefile b/utils/klish/Makefile index 4374e276bb..0a63a1053b 100644 --- a/utils/klish/Makefile +++ b/utils/klish/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=klish PKG_VERSION:=2.1.3 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=http://libcode.org/attachments/download/66/ @@ -50,6 +50,9 @@ define Package/klish/description More information about these tools is to be found on the klish web site. endef +TARGET_LDFLAGS += -lxml2 -lz +TARGET_CFLAGS += -D_XOPEN_SOURCE=500 + define Build/Configure $(call Build/Configure/Default, \ --with-libxml2 \