3.4, at least).
rlim_t is defined in <sys/types.h>, so we usually need that.
Some stuff in <sys/resource.h> needs <sys/time.h> for timeval just to
be able to compile :(
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85500
13f79535-47bb-0310-9956-
ffa450edef68
dnl
AC_DEFUN(AC_TYPE_RLIM_T, [
AC_CACHE_CHECK([for rlim_t], ac_cv_type_rlim_t, [
- AC_TRY_COMPILE([#include <sys/resource.h>], [rlim_t spoon;], [
+ AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+], [rlim_t spoon;], [
ac_cv_type_rlim_t=yes
],[ac_cv_type_rlim_t=no
])
#include <sys/time.h>
#endif
+#ifdef HAVE_SYS_RESOURCE_H
+#include <sys/resource.h>
+#endif
+
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif