diff options
Diffstat (limited to 'source4/lib/replace')
-rw-r--r-- | source4/lib/replace/replace.h | 15 |
1 files changed, 10 insertions, 5 deletions
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 <sys/time.h> +#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 |