diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2009-02-17 13:27:11 +0100 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2009-02-17 13:27:11 +0100 |
commit | 0433ed33da3225a619e1c6a02e658f126af346e5 (patch) | |
tree | d7e704b4a07ced584e2aea789d03b97d9a42a8b1 /src/port/string.c | |
parent | ba01391209f8c72fc6e4264c21c3fe21d6d16d60 (diff) | |
download | wolfbones-0433ed33da3225a619e1c6a02e658f126af346e5.tar.gz wolfbones-0433ed33da3225a619e1c6a02e658f126af346e5.tar.bz2 |
fixed strerror_r stub on FreeBSD (though we don't need it there as the C library one is working)
Diffstat (limited to 'src/port/string.c')
-rw-r--r-- | src/port/string.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/port/string.c b/src/port/string.c index 846b068..74cf31c 100644 --- a/src/port/string.c +++ b/src/port/string.c @@ -60,7 +60,8 @@ int wolf_strerror_r( int num, char *buf, size_t buflen ) { * is never returned and a strcmp with prefix "Unknown error" or similar * is not really acceptable. */ - if( msg == NULL ) { + if( msg == NULL /* Solaris 8 */ || + strncmp( msg, "Unknown error:", strlen( "Unknown error:" ) ) == 0 /* FreeBSD */ ) { /* Linux returns an empty string in this case, why? */ len = snprintf( buf, buflen, "Unknown error %d", num ); errno = EINVAL; |