[PATCH 8 of 8] Do not set O_DIRECT in Android builds
Per Olav Høydahl Ohme
phoydahl at cisco.com
Fri Jul 18 12:05:54 UTC 2014
# HG changeset patch
# User Per Olav Hoydahl Ohme <phoydahl at cisco.com>
# Date 1405683324 -7200
# Fri Jul 18 13:35:24 2014 +0200
# Node ID e0bfe62e3ccac0660d832cb6ed880527ac159801
# Parent 4b15d9a30a661d82130b8661ee0f97e1a9192ef6
Do not set O_DIRECT in Android builds.
Use of O_DIRECT flag for open() is not supported by Bionic/Android.
diff -r 4b15d9a30a66 -r e0bfe62e3cca auto/unix
--- a/auto/unix Fri Jul 18 13:35:24 2014 +0200
+++ b/auto/unix Fri Jul 18 13:35:24 2014 +0200
@@ -193,6 +193,7 @@
ngx_feature_test="posix_fadvise(0, 0, 0, POSIX_FADV_SEQUENTIAL);"
. auto/feature
+if [[ $NGX_PLATFORM != "Android:"* ]]; then
ngx_feature="O_DIRECT"
ngx_feature_name="NGX_HAVE_O_DIRECT"
@@ -203,6 +204,7 @@
ngx_feature_test="fcntl(0, F_SETFL, O_DIRECT);"
. auto/feature
+fi
if [ $ngx_found = yes -a "$NGX_SYSTEM" = "Linux" ]; then
have=NGX_HAVE_ALIGNED_DIRECTIO . auto/have
@@ -217,6 +219,7 @@
ngx_feature_test="fcntl(0, F_NOCACHE, 1);"
. auto/feature
+if [[ $NGX_PLATFORM != "Android:"* ]]; then
ngx_feature="directio()"
ngx_feature_name="NGX_HAVE_DIRECTIO"
@@ -228,6 +231,7 @@
ngx_feature_test="directio(0, DIRECTIO_ON);"
. auto/feature
+fi
ngx_feature="statfs()"
ngx_feature_name="NGX_HAVE_STATFS"
More information about the nginx-devel
mailing list