]> git.kaiwu.me - nginx.git/commitdiff
Unbreak building on FreeBSD without file AIO.
authorValentin Bartenev <vbart@nginx.com>
Wed, 11 Feb 2015 17:00:07 +0000 (20:00 +0300)
committerValentin Bartenev <vbart@nginx.com>
Wed, 11 Feb 2015 17:00:07 +0000 (20:00 +0300)
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.

auto/os/freebsd
src/core/ngx_buf.h

index 6aa823f92507655d95ed25b5a8f306a168ec486c..22ad403639834efa7629516350100f636e2f2477 100644 (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
index 219894ffc5fca87104023312b34decb34b40d737..9ee1c588cdaa4c2e9f6bc9528a1548254cdf9328 100644 (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