diff options
author | jerenkrantz <jerenkrantz@13f79535-47bb-0310-9956-ffa450edef68> | 2004-11-17 01:07:02 +0000 |
---|---|---|
committer | jerenkrantz <jerenkrantz@13f79535-47bb-0310-9956-ffa450edef68> | 2004-11-17 01:07:02 +0000 |
commit | 6c396ff5c726ad3ccba9f8454d1d41ab65513945 (patch) | |
tree | 9fe875f78a137b87968ce8d5bcf5b554f2608fab /misc/unix/errorcodes.c | |
parent | 9ffc3ba97e22859b387d44eaf5d48e559c6e8874 (diff) | |
download | libapr-6c396ff5c726ad3ccba9f8454d1d41ab65513945.tar.gz |
Merge in changes from trunk to 1.0.x.
Changes have been reviewed to be binary compatible with 1.0.0 by Justin to
the best of his sleep-deprived ability.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.0.x@76072 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'misc/unix/errorcodes.c')
-rw-r--r-- | misc/unix/errorcodes.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/misc/unix/errorcodes.c b/misc/unix/errorcodes.c index 447b8d859..5c318d530 100644 --- a/misc/unix/errorcodes.c +++ b/misc/unix/errorcodes.c @@ -374,7 +374,13 @@ static char *native_strerror(apr_status_t statcode, char *buf, sprintf(err, "Native Error #%d", statcode); return stuffbuffer(buf, bufsize, err); #else - return stuffbuffer(buf, bufsize, strerror(statcode)); + const char *err = strerror(statcode); + if (err) { + return stuffbuffer(buf, bufsize, err); + } else { + return stuffbuffer(buf, bufsize, + "APR does not understand this error code"); + } #endif } #endif |