From 41ff8ad80e627f2c1df1f39831051a2911af54f4 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 4 Sep 2006 13:07:29 +0000 Subject: r18039: Include header with time_t if needed. (This used to be commit b0cfdd24be88ba3963eb43cdbcb6317e65aed57b) --- source4/lib/replace/replace.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'source4/lib/replace') diff --git a/source4/lib/replace/replace.h b/source4/lib/replace/replace.h index 827777983f..4f0308ce52 100644 --- a/source4/lib/replace/replace.h +++ b/source4/lib/replace/replace.h @@ -76,11 +76,21 @@ char *rep_strdup(const char *s); void *rep_memmove(void *dest,const void *src,int size); #endif +#if !defined(HAVE_MKTIME) || !defined(HAVE_TIMEGM) +#include +#endif + #ifndef HAVE_MKTIME #define mktime rep_mktime time_t rep_mktime(struct tm *t); #endif +#ifndef HAVE_TIMEGM +struct tm; +#define timegm rep_timegm +time_t rep_timegm(struct tm *tm); +#endif + #ifndef HAVE_STRLCPY #define strlcpy rep_strlcpy size_t rep_strlcpy(char *d, const char *s, size_t bufsize); @@ -145,11 +155,6 @@ int rep_vasprintf(char **ptr, const char *format, va_list ap); #define bzero(a,b) memset((a),'\0',(b)) #endif -#ifndef HAVE_TIMEGM -struct tm; -#define timegm rep_timegm -time_t rep_timegm(struct tm *tm); -#endif #ifndef PRINTF_ATTRIBUTE #if __GNUC__ >= 3 -- cgit