Portability patches from Kevin Dalley for Freebsd 4.0.
[awesomized/libmemcached] / lib / common.h
index 76c734ed1fe25c4c7bd7ab294818ea07bfc174ab..395b80ef83730863c5fbe9d248bdf498fa9a41a6 100644 (file)
 #include <unistd.h>
 #include <limits.h>
 #include <assert.h>
-#include <time.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <sys/un.h>
 #include <netinet/tcp.h>
+#include "libmemcached_config.h"
+
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+#  include <sys/time.h>
+# else
+#  include <time.h>
+# endif
+#endif