diff options
author | Davi Arnaut <davi.arnaut@oracle.com> | 2010-10-19 15:05:25 -0200 |
---|---|---|
committer | Davi Arnaut <davi.arnaut@oracle.com> | 2010-10-19 15:05:25 -0200 |
commit | 9be9ad7b05590c3dc1ec432256f41924efa5ada0 (patch) | |
tree | 7ddffd8aa39d70714bcf415cd7d932212408af50 | |
parent | a7c933384c6e8e1706235fbbf9572740a3ecd931 (diff) | |
parent | 7406b38efa0a2eec5a245839c5ce13b85d51d125 (diff) | |
download | mariadb-git-9be9ad7b05590c3dc1ec432256f41924efa5ada0.tar.gz |
Merge of mysql-5.1-bugteam into mysql-5.5-bugteam.
-rw-r--r-- | configure.cmake | 3 | ||||
-rw-r--r-- | configure.in | 7 | ||||
-rw-r--r-- | mysys/my_sync.c | 2 |
3 files changed, 10 insertions, 2 deletions
diff --git a/configure.cmake b/configure.cmake index 91c39fc5b09..cba9e79ff23 100644 --- a/configure.cmake +++ b/configure.cmake @@ -299,7 +299,8 @@ CHECK_FUNCTION_EXISTS (dlopen HAVE_DLOPEN) CHECK_FUNCTION_EXISTS (fchmod HAVE_FCHMOD) CHECK_FUNCTION_EXISTS (fcntl HAVE_FCNTL) CHECK_FUNCTION_EXISTS (fconvert HAVE_FCONVERT) -CHECK_SYMBOL_EXISTS(fdatasync "unistd.h" HAVE_FDATASYNC) +CHECK_FUNCTION_EXISTS (fdatasync HAVE_FDATASYNC) +CHECK_SYMBOL_EXISTS(fdatasync "unistd.h" HAVE_DECL_FDATASYNC) CHECK_FUNCTION_EXISTS (fesetround HAVE_FESETROUND) CHECK_FUNCTION_EXISTS (fpsetmask HAVE_FPSETMASK) CHECK_FUNCTION_EXISTS (fseeko HAVE_FSEEKO) diff --git a/configure.in b/configure.in index 81dd853a455..d8a45214a5c 100644 --- a/configure.in +++ b/configure.in @@ -2120,6 +2120,13 @@ MYSQL_TYPE_QSORT AC_FUNC_UTIME_NULL AC_FUNC_VPRINTF +AC_CHECK_DECLS([fdatasync],,, +[ +#ifdef HAVE_UNISTD_H +# include <unistd.h> +#endif +]) + AC_CHECK_FUNCS(alarm bfill bmove bsearch bzero \ chsize cuserid fchmod fcntl \ fdatasync fesetround finite fpresetsticky fpsetmask fsync ftruncate \ diff --git a/mysys/my_sync.c b/mysys/my_sync.c index b090788d4e9..e33a9342afa 100644 --- a/mysys/my_sync.c +++ b/mysys/my_sync.c @@ -58,7 +58,7 @@ int my_sync(File fd, myf my_flags) /* Some file systems don't support F_FULLFSYNC and fail above: */ DBUG_PRINT("info",("fcntl(F_FULLFSYNC) failed, falling back")); #endif -#if defined(HAVE_FDATASYNC) +#if defined(HAVE_FDATASYNC) && HAVE_DECL_FDATASYNC res= fdatasync(fd); #elif defined(HAVE_FSYNC) res= fsync(fd); |