diff options
Diffstat (limited to 'pr/src/md/unix/unix_errors.c')
-rw-r--r-- | pr/src/md/unix/unix_errors.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/pr/src/md/unix/unix_errors.c b/pr/src/md/unix/unix_errors.c index 4fbcd821..90ebe7de 100644 --- a/pr/src/md/unix/unix_errors.c +++ b/pr/src/md/unix/unix_errors.c @@ -851,7 +851,21 @@ void _MD_hpux_map_sendfile_error(int err) #ifdef SOLARIS void _MD_solaris_map_sendfile_error(int err) { - _MD_unix_map_default_error(err) ; + PRErrorCode prError; + + switch (err) { + /* + * Solaris defines a 0 return value for sendfile to mean end-of-file. + */ + case 0: + prError = PR_END_OF_FILE_ERROR; + break; + + default: + _MD_unix_map_default_error(err) ; + return; + } + PR_SetError(prError, err); } #endif /* SOLARIS */ |