asio: unbreak musl

Do not change the code path for glibc by using a macro
MUSL_LIBC which is defined only if target is *-musl.
This commit is contained in:
jbu 2015-07-12 14:23:17 +02:00
parent 4be81ecea2
commit f9cde9ac21
2 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,11 @@
--- include/asio/impl/error_code.ipp 2015-03-23 21:28:30.000000000 +0100
+++ include/asio/impl/error_code.ipp 2015-07-12 14:49:24.720507062 +0200
@@ -100,7 +100,7 @@
#elif defined(__MACH__) && defined(__APPLE__) \
|| defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) \
|| defined(_AIX) || defined(__hpux) || defined(__osf__) \
- || defined(__ANDROID__)
+ || defined(__ANDROID__) || defined(MUSL_LIBC)
char buf[256] = "";
using namespace std;
strerror_r(value, buf, sizeof(buf));

View File

@ -1,7 +1,7 @@
# Template file for 'asio'
pkgname=asio
version=1.10.6
revision=1
revision=2
build_style=gnu-configure
makedepends="boost-devel"
depends="boost-devel"
@ -11,3 +11,11 @@ license="Boost"
homepage="http://asio.sourceforge.net"
distfiles="${SOURCEFORGE_SITE}/asio/asio-${version}.tar.bz2"
checksum=e0d71c40a7b1f6c1334008fb279e7361b32a063e020efd21e40d9d8ff037195e
pre_configure() {
case "$XBPS_TARGET_MACHINE" in
*-musl) # Enable strerror_r(3) version for musl libc
sed -e "/#define ASIO_IMPL_ERROR_CODE_IPP/a #define MUSL_LIBC" \
-i ${wrksrc}/include/asio/impl/error_code.ipp
esac
}