Unbreak building on FreeBSD without file AIO.

It appeared that the NGX_HAVE_AIO_SENDFILE macro was defined regardless of
the "--with-file-aio" configure option and the NGX_HAVE_FILE_AIO macro.

Now they are related.

Additionally, fixed one macro.
This commit is contained in:
Valentin Bartenev 2015-02-11 20:00:07 +03:00
parent 2b8d6ad805
commit 0a3d458805
2 changed files with 6 additions and 4 deletions

View File

@ -44,10 +44,12 @@ if [ $osreldate -gt 300007 ]; then
CORE_SRCS="$CORE_SRCS $FREEBSD_SENDFILE_SRCS"
fi
if [ $osreldate -gt 502103 ]; then
echo " + sendfile()'s SF_NODISKIO found"
if [ $NGX_FILE_AIO = YES ]; then
if [ $osreldate -gt 502103 ]; then
echo " + sendfile()'s SF_NODISKIO found"
have=NGX_HAVE_AIO_SENDFILE . auto/have
have=NGX_HAVE_AIO_SENDFILE . auto/have
fi
fi
# POSIX semaphores

View File

@ -94,7 +94,7 @@ struct ngx_output_chain_ctx_s {
unsigned aio:1;
ngx_output_chain_aio_pt aio_handler;
#if (NGX_HAVE_FILE_AIO)
#if (NGX_HAVE_AIO_SENDFILE)
ssize_t (*aio_preload)(ngx_buf_t *file);
#endif
#endif