diff --git a/lib/roken/roken.h b/lib/roken/roken.h index c24e1b492..435b945f7 100644 --- a/lib/roken/roken.h +++ b/lib/roken/roken.h @@ -153,8 +153,17 @@ int setegid(int egid); #define strrchr(p, ch) rindex(p, ch) #endif -#include +#ifdef TIME_WITH_SYS_TIME #include +#include +#else +#ifdef HAVE_SYS_TIME_H +#include +#else +#include +#endif /* !HAVE_SYS_TIME_H */ +#endif /* !TIME_WITH_SYS_TIME */ + time_t tm2time (struct tm tm, int local); int unix_verify_user(char *user, char *password); @@ -187,6 +196,7 @@ void mini_inetd (int port); #define min(a,b) (((a)<(b))?(a):(b)) #endif +#ifdef HAVE_SYSLOG_H #include /* Misc definitions for old syslogs */ @@ -212,6 +222,7 @@ void vsyslog(int pri, const char *fmt, va_list ap); #ifndef LOG_AUTHPRIV #define LOG_AUTHPRIV LOG_AUTH #endif +#endif #ifdef NEED_OPTARG_DECLARATION extern char *optarg; diff --git a/lib/roken/roken.h.in b/lib/roken/roken.h.in index c24e1b492..435b945f7 100644 --- a/lib/roken/roken.h.in +++ b/lib/roken/roken.h.in @@ -153,8 +153,17 @@ int setegid(int egid); #define strrchr(p, ch) rindex(p, ch) #endif -#include +#ifdef TIME_WITH_SYS_TIME #include +#include +#else +#ifdef HAVE_SYS_TIME_H +#include +#else +#include +#endif /* !HAVE_SYS_TIME_H */ +#endif /* !TIME_WITH_SYS_TIME */ + time_t tm2time (struct tm tm, int local); int unix_verify_user(char *user, char *password); @@ -187,6 +196,7 @@ void mini_inetd (int port); #define min(a,b) (((a)<(b))?(a):(b)) #endif +#ifdef HAVE_SYSLOG_H #include /* Misc definitions for old syslogs */ @@ -212,6 +222,7 @@ void vsyslog(int pri, const char *fmt, va_list ap); #ifndef LOG_AUTHPRIV #define LOG_AUTHPRIV LOG_AUTH #endif +#endif #ifdef NEED_OPTARG_DECLARATION extern char *optarg;