From c4e5fc1697e0bc22da0adda38c73cc32d2b40523 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Wed, 13 Jan 2010 18:52:56 -0800 Subject: [PATCH] Fixed build on CentOS. --- clients/memslap.c | 13 +++++++++++++ clients/ms_conn.c | 10 ++++++++++ clients/ms_task.c | 10 ++++++++++ clients/ms_thread.c | 10 ++++++++++ configure.ac | 6 +++--- 5 files changed, 46 insertions(+), 3 deletions(-) diff --git a/clients/memslap.c b/clients/memslap.c index 47be3c37..11b4df87 100644 --- a/clients/memslap.c +++ b/clients/memslap.c @@ -13,9 +13,22 @@ * Mingqiang Zhuang * */ +#include "config.h" + #include #include #include +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif + #include "ms_sigsegv.h" #include "ms_setting.h" diff --git a/clients/ms_conn.c b/clients/ms_conn.c index c062dc29..ea52c169 100644 --- a/clients/ms_conn.c +++ b/clients/ms_conn.c @@ -19,6 +19,16 @@ #include #include #include +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif #include "ms_setting.h" #include "ms_thread.h" #include "ms_atomic.h" diff --git a/clients/ms_task.c b/clients/ms_task.c index bcd2757c..5fbd7d13 100644 --- a/clients/ms_task.c +++ b/clients/ms_task.c @@ -12,6 +12,16 @@ #include "config.h" #include +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif #include "ms_thread.h" #include "ms_setting.h" diff --git a/clients/ms_thread.c b/clients/ms_thread.c index 92d68871..048593d6 100644 --- a/clients/ms_thread.c +++ b/clients/ms_thread.c @@ -11,6 +11,16 @@ #include "config.h" +#if TIME_WITH_SYS_TIME +# include +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif #include "ms_thread.h" #include "ms_setting.h" #include "ms_atomic.h" diff --git a/configure.ac b/configure.ac index f12894ea..c8054fe3 100644 --- a/configure.ac +++ b/configure.ac @@ -56,13 +56,13 @@ PANDORA_HAVE_LIBINNODB PANDORA_PRINT_CALLSTACK AC_CHECK_HEADERS([atomic.h]) -AS_IF([test "x$ac_cv_header_atomic_h" = "xyes"], +AS_IF([test "x$ac_cv_header_atomic_h" = "xyes"],[ AC_CHECK_FUNCS(atomic_add_64) AC_CHECK_FUNCS(atomic_add_32) - AS_IF([test "x$ac_cv_func_atomic_add_64" = "xyes" -a "x$ac_cv_func_atomic_add_32" = "xyes"], + AS_IF([test "x$ac_cv_func_atomic_add_64" = "xyes" -a "x$ac_cv_func_atomic_add_32" = "xyes"],[ AC_DEFINE([USE_ATOMIC_H], [1], - [Define to true if you want to use functions from atomic.h]))) + [Define to true if you want to use functions from atomic.h])])]) AC_CONFIG_FILES([ Makefile -- 2.30.2