diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2006-09-04 13:07:29 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:17:06 -0500 |
commit | 41ff8ad80e627f2c1df1f39831051a2911af54f4 (patch) | |
tree | 5d2021548213892d65eadde594922c855e0cb6b0 | |
parent | 6cf5528e20685585d4d1e3b779088f488f664273 (diff) | |
download | samba-41ff8ad80e627f2c1df1f39831051a2911af54f4.tar.gz samba-41ff8ad80e627f2c1df1f39831051a2911af54f4.tar.bz2 samba-41ff8ad80e627f2c1df1f39831051a2911af54f4.zip |
r18039: Include header with time_t if needed.
(This used to be commit b0cfdd24be88ba3963eb43cdbcb6317e65aed57b)
-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 |