mirror of
https://github.com/dlang/phobos.git
synced 2025-04-27 13:40:20 +03:00
fix strerror usage in uClibc version
This commit is contained in:
parent
becfefbae9
commit
bb3681fd14
2 changed files with 7 additions and 2 deletions
|
@ -1536,10 +1536,13 @@ private bool isUnionAliasedImpl(T)(size_t offset)
|
|||
static assert( isUnionAliased!(S.A5, 1)); //a5.b1;
|
||||
}
|
||||
|
||||
version (CRuntime_Glibc) version = GNU_STRERROR;
|
||||
version (CRuntime_UClibc) version = GNU_STRERROR;
|
||||
|
||||
package string errnoString(int errno) nothrow @trusted
|
||||
{
|
||||
import core.stdc.string : strlen;
|
||||
version (CRuntime_Glibc)
|
||||
version (GNU_STRERROR)
|
||||
{
|
||||
import core.stdc.string : strerror_r;
|
||||
char[1024] buf = void;
|
||||
|
|
|
@ -146,6 +146,8 @@ class SocketException: Exception
|
|||
mixin basicExceptionCtors;
|
||||
}
|
||||
|
||||
version (CRuntime_Glibc) version = GNU_STRERROR;
|
||||
version (CRuntime_UClibc) version = GNU_STRERROR;
|
||||
|
||||
/*
|
||||
* Needs to be public so that SocketOSException can be thrown outside of
|
||||
|
@ -159,7 +161,7 @@ string formatSocketError(int err) @trusted
|
|||
{
|
||||
char[80] buf;
|
||||
const(char)* cs;
|
||||
version (CRuntime_Glibc)
|
||||
version (GNU_STRERROR)
|
||||
{
|
||||
cs = strerror_r(err, buf.ptr, buf.length);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue