klish: fix compilation with uClibc-ng
authorRosen Penev <redacted>
Fri, 14 Aug 2020 02:30:30 +0000 (19:30 -0700)
committerRosen Penev <redacted>
Fri, 14 Aug 2020 05:10:13 +0000 (22:10 -0700)
sigignore is missing from libc.

Signed-off-by: Rosen Penev <redacted>
utils/klish/Makefile
utils/klish/patches/010-shell_execute_fix.patch

index 04633d8b09ea5e968924e1893e51647f964d5d4f..e510291b04616c58f48b0e9d26d3ab869e737547 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=klish
 PKG_VERSION:=2.2.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://libcode.org/attachments/download/77/
@@ -54,8 +54,6 @@ endef
 
 CONFIGURE_ARGS += --with-libxml2
 
-TARGET_CFLAGS += -D_XOPEN_SOURCE=500
-
 define Package/klish/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clish $(1)/usr/bin/
index c9ea8c1aa9da4a8abb88238550b96a7a27ec1773..8de164e52d81e16eeb10dd320c3964eaf1a353c0 100644 (file)
@@ -1,16 +1,19 @@
 --- a/clish/shell/shell_execute.c
 +++ b/clish/shell/shell_execute.c
-@@ -19,13 +19,6 @@
+@@ -19,12 +19,14 @@
  #include <signal.h>
  #include <fcntl.h>
  
--/* Empty signal handler to ignore signal but don't use SIG_IGN. */
++#if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_OBSOLETE_BSD_SIGNAL__)
+ /* Empty signal handler to ignore signal but don't use SIG_IGN. */
 -static void sigignore(int signo)
--{
--      signo = signo; /* Happy compiler */
++static int sigignore(int signo)
+ {
+       signo = signo; /* Happy compiler */
 -      return;
--}
--
++      return 0;
+ }
++#endif
  /*-------------------------------------------------------- */
  static int clish_shell_lock(const char *lock_path)
- {
git clone https://git.99rst.org/PROJECT