summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.in7
-rw-r--r--include/m_string.h2
2 files changed, 2 insertions, 7 deletions
diff --git a/configure.in b/configure.in
index 8ba208b1ef5..3603512f3f1 100644
--- a/configure.in
+++ b/configure.in
@@ -2042,12 +2042,7 @@ MYSQL_TYPE_QSORT
AC_FUNC_UTIME_NULL
AC_FUNC_VPRINTF
-AC_CHECK_DECLS([fdatasync],,,
-[
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-])
+AC_CHECK_DECLS([fdatasync, bzero])
AC_CHECK_FUNCS(alarm bfill bmove bsearch bzero \
chsize cuserid fchmod fcntl \
diff --git a/include/m_string.h b/include/m_string.h
index 0d248ea0ad3..53572a4ac9e 100644
--- a/include/m_string.h
+++ b/include/m_string.h
@@ -58,7 +58,7 @@
# define bfill(A,B,C) memset((A),(C),(B))
#endif
-#if !defined(bzero) && !defined(HAVE_BZERO)
+#if !defined(bzero) && (!defined(HAVE_BZERO) || !defined(HAVE_DECL_BZERO))
# define bzero(A,B) memset((A),0,(B))
#endif