klish: fixup sigignore support
authorRosen Penev <rosenp@gmail.com>
Sat, 22 Aug 2020 21:07:29 +0000 (14:07 -0700)
committerRosen Penev <rosenp@gmail.com>
Sat, 22 Aug 2020 21:12:01 +0000 (14:12 -0700)
Added _GNU_SOURCE for uClibc-ng compatibility. _XOPEN_SOURCE does not
seem to be enough.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
utils/klish/Makefile
utils/klish/patches/010-shell_execute_fix.patch

index e510291b04616c58f48b0e9d26d3ab869e737547..17e813375a3d0927d84add327c86dabf714a5b33 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=klish
 PKG_VERSION:=2.2.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://libcode.org/attachments/download/77/
@@ -54,6 +54,8 @@ endef
 
 CONFIGURE_ARGS += --with-libxml2
 
+TARGET_CFLAGS += -D_GNU_SOURCE
+
 define Package/klish/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clish $(1)/usr/bin/
index 8de164e52d81e16eeb10dd320c3964eaf1a353c0..f74e91c4bb758fab68a1a6c6ab0a4f8b2482ec23 100644 (file)
@@ -6,12 +6,10 @@
  
 +#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)
-+static int sigignore(int signo)
+ static void sigignore(int signo)
  {
        signo = signo; /* Happy compiler */
--      return;
-+      return 0;
+       return;
  }
 +#endif