Browse Source

tcsh: fix musl compatibility

Avoid using `union wait` under musl as it does not provide this definition.
Implement solution suggested by http://www.openwall.com/lists/musl/2013/06/21/4

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Jo-Philipp Wich 9 years ago
parent
commit
b2aba46406
2 changed files with 13 additions and 2 deletions
  1. 2
    2
      utils/tcsh/Makefile
  2. 11
    0
      utils/tcsh/patches/100-musl-compat.patch

+ 2
- 2
utils/tcsh/Makefile View File

@@ -1,5 +1,5 @@
1 1
 #
2
-# Copyright (C) 2011-2014 OpenWrt.org
2
+# Copyright (C) 2011-2015 OpenWrt.org
3 3
 #
4 4
 # This is free software, licensed under the GNU General Public License v2.
5 5
 # See /LICENSE for more information.
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
8 8
 
9 9
 PKG_NAME:=tcsh
10 10
 PKG_VERSION:=6.19.00
11
-PKG_RELEASE:=1
11
+PKG_RELEASE:=2
12 12
 
13 13
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
14 14
 PKG_SOURCE_URL:=http://ftp.funet.fi/pub/mirrors/ftp.astron.com/pub/tcsh/

+ 11
- 0
utils/tcsh/patches/100-musl-compat.patch View File

@@ -0,0 +1,11 @@
1
+--- a/sh.proc.c
2
++++ b/sh.proc.c
3
+@@ -48,7 +48,7 @@ RCSID("$tcsh: sh.proc.c,v 3.127 2015/02/
4
+ #endif /* aiws */
5
+ 
6
+ #if defined(_BSD) || (defined(IRIS4D) && __STDC__) || defined(__lucid) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)
7
+-# if !defined(__ANDROID__)
8
++# if !(defined(__ANDROID__) || (defined(__linux__) && !defined(__GLIBC__)))
9
+ #  define BSDWAIT
10
+ # endif
11
+ #endif /* _BSD || (IRIS4D && __STDC__) || __lucid || glibc */