diff options
author | Bartłomiej Piotrowski <bpiotrowski@alpinelinux.org> | 2014-02-05 17:34:42 +0100 |
---|---|---|
committer | Bartłomiej Piotrowski <bpiotrowski@alpinelinux.org> | 2014-02-05 17:51:41 +0100 |
commit | f01e31eec18317297a6f899c41362a21a7e7c9b3 (patch) | |
tree | 5a2f9d086a28c27ecfaba1166a1e57686b371b60 | |
parent | bc05b5ad6e378b520fcac69e97bcbf9a08f3a2c1 (diff) | |
download | aports-f01e31eec18317297a6f899c41362a21a7e7c9b3.tar.bz2 aports-f01e31eec18317297a6f899c41362a21a7e7c9b3.tar.xz |
main/fish: fix musl build
-rw-r--r-- | main/fish/APKBUILD | 12 | ||||
-rw-r--r-- | main/fish/fish-safe-strerror.patch | 37 |
2 files changed, 17 insertions, 32 deletions
diff --git a/main/fish/APKBUILD b/main/fish/APKBUILD index 9e233274c..388afdc90 100644 --- a/main/fish/APKBUILD +++ b/main/fish/APKBUILD @@ -15,7 +15,8 @@ depends_dev="libiconv-dev ncurses-dev" makedepends="$depends_dev autoconf automake libtool" install="" subpackages="$pkgname-doc" -source="http://fishshell.com/files/$pkgver/fish-$pkgver.tar.gz" +source="http://fishshell.com/files/$pkgver/fish-$pkgver.tar.gz + fish-safe-strerror.patch" _builddir="$srcdir"/fish-$pkgver prepare() { @@ -43,6 +44,9 @@ package() { make install DESTDIR="$pkgdir" || return 1 } -md5sums="3a29aebde522b8f52d9975d7423db99e fish-2.1.0.tar.gz" -sha256sums="af527af9d145df5675ca3031c1a87007d4f4753a1cde49da88f4eb883a1cf044 fish-2.1.0.tar.gz" -sha512sums="cd8a678df948baefafbf54a14ece7b52fff6620939d82ba0d0f4cd8ad1ae59842a847231de8465a4471e48fb86866f1113bba4ec9cd6433851bb538b1f965075 fish-2.1.0.tar.gz" +md5sums="3a29aebde522b8f52d9975d7423db99e fish-2.1.0.tar.gz +50547af78aef0c4d45904e79cd637e0e fish-safe-strerror.patch" +sha256sums="af527af9d145df5675ca3031c1a87007d4f4753a1cde49da88f4eb883a1cf044 fish-2.1.0.tar.gz +dd13865f8b45ea616cb37678268ecee65ce4539575ee98ab503633c7b2145edd fish-safe-strerror.patch" +sha512sums="cd8a678df948baefafbf54a14ece7b52fff6620939d82ba0d0f4cd8ad1ae59842a847231de8465a4471e48fb86866f1113bba4ec9cd6433851bb538b1f965075 fish-2.1.0.tar.gz +f23d3b3db8fd9ac28f04a638478183abdebcf0dfbf50989625897741ebd19a771d6cd2baeae08b6c5887013fdba84118b2429b17cf541260ab894f173c81db17 fish-safe-strerror.patch" diff --git a/main/fish/fish-safe-strerror.patch b/main/fish/fish-safe-strerror.patch index 114953ba6..86916b3d3 100644 --- a/main/fish/fish-safe-strerror.patch +++ b/main/fish/fish-safe-strerror.patch @@ -1,31 +1,12 @@ ---- a/wutil.cpp -+++ b/wutil.cpp -@@ -319,27 +319,7 @@ +diff -rupN a/wutil.cpp b/wutil.cpp +--- a/wutil.cpp 2013-10-19 22:10:26.000000000 +0200 ++++ b/wutil.cpp 2014-02-05 17:30:54.372370762 +0100 +@@ -319,7 +319,7 @@ static inline void safe_append(char *buf const char *safe_strerror(int err) { -- if (err >= 0 && err < sys_nerr && sys_errlist[err] != NULL) -- { -- return sys_errlist[err]; -- } -- else -- { -- int saved_err = errno; -- -- /* Use a shared buffer for this case */ -- static char buff[384]; -- char errnum_buff[64]; -- format_long_safe(errnum_buff, err); -- -- buff[0] = '\0'; -- safe_append(buff, "unknown error (errno was ", sizeof buff); -- safe_append(buff, errnum_buff, sizeof buff); -- safe_append(buff, ")", sizeof buff); -- -- errno = saved_err; -- return buff; -- } -+ return strerror(err); - } - - void safe_perror(const char *message) +-#if defined(__UCLIBC__) ++#if defined(__UCLIBC__) || !defined(__GLIBC__) + // uClibc does not have sys_errlist, however, its strerror is believed to be async-safe + // See #808 + return strerror(err); |