changed dev_sck_sendfile_stream to handle return value of 0 by sendfile as if it's EWOULDBLOCK

This commit is contained in:
hyung-hwan 2023-10-15 16:02:09 +09:00
parent 91cea4d6be
commit faebe1d043
3 changed files with 2 additions and 3 deletions

View File

@ -404,4 +404,3 @@ void hio_seterrufmtwithsyserr (hio_t* hio, int syserr_type, int syserr_code, con
}
}*/
}

View File

@ -30,8 +30,7 @@
/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */
#undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
*/
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. */
#undef HAVE_DIRENT_H
/* Define to 1 if you have the `dirfd' function. */

View File

@ -1122,6 +1122,7 @@ static int dev_sck_sendfile_stream (hio_dev_t* dev, hio_syshnd_t in_fd, hio_foff
return -1;
}
*len = x;
if (x == 0) return 0; /* treat it like EWOULDBLOCK? */
#else
hio_seterrnum (hio, HIO_ENOIMPL);
return -1;