From: Monty Taylor Date: Thu, 14 Jan 2010 02:52:56 +0000 (-0800) Subject: Fixed build on CentOS. X-Git-Tag: 0.40~115^2~2 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=c4e5fc1697e0bc22da0adda38c73cc32d2b40523;p=awesomized%2Flibmemcached Fixed build on CentOS. --- 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