Added explicit include of time.h. Most of the systems have it included due to namespace pollution, but relying on this is a bad idea. Explicit include is required for at least Debian GNU/Hurd.
diff --git a/src/os/unix/ngx_freebsd_config.h b/src/os/unix/ngx_freebsd_config.h index 460581a..5b3ff27 100644 --- a/src/os/unix/ngx_freebsd_config.h +++ b/src/os/unix/ngx_freebsd_config.h
@@ -23,6 +23,7 @@ #include <grp.h> #include <dirent.h> #include <glob.h> +#include <time.h> #include <sys/param.h> /* ALIGN() */ #include <sys/mount.h> /* statfs() */
diff --git a/src/os/unix/ngx_posix_config.h b/src/os/unix/ngx_posix_config.h index a0a2c8c..4d432a7 100644 --- a/src/os/unix/ngx_posix_config.h +++ b/src/os/unix/ngx_posix_config.h
@@ -45,6 +45,7 @@ #include <grp.h> #include <dirent.h> #include <glob.h> +#include <time.h> #if (NGX_HAVE_SYS_PARAM_H) #include <sys/param.h> /* statfs() */ #endif
diff --git a/src/os/unix/ngx_solaris_config.h b/src/os/unix/ngx_solaris_config.h index 8a86fe6..e664ba8 100644 --- a/src/os/unix/ngx_solaris_config.h +++ b/src/os/unix/ngx_solaris_config.h
@@ -29,6 +29,7 @@ #include <grp.h> #include <dirent.h> #include <glob.h> +#include <time.h> #include <sys/statvfs.h> /* statvfs() */ #include <sys/filio.h> /* FIONBIO */