include sys/time.h except on FreeBSD 7

This commit is contained in:
Doug MacEachern 2008-09-07 15:17:23 +00:00
parent 4b26b0d54c
commit 0cbf1411d2
1 changed files with 9 additions and 4 deletions

View File

@ -35,6 +35,15 @@
#include <sys/types.h> #include <sys/types.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
# ifdef __FreeBSD__
# include <sys/param.h>
# if (__FreeBSD_version < 700000)
# include <sys/time.h>
# endif
# else
# include <sys/time.h>
# endif
#include <sys/resource.h>
#endif #endif
#include "javasigar_generated.h" #include "javasigar_generated.h"
@ -1613,10 +1622,6 @@ JNIEXPORT jlong SIGAR_JNI(ResourceLimit_INFINITY)
#ifdef WIN32 #ifdef WIN32
return 0x7fffffff; return 0x7fffffff;
#else #else
#ifndef __FreeBSD__
#include <sys/time.h>
#endif
#include <sys/resource.h>
return RLIM_INFINITY; return RLIM_INFINITY;
#endif #endif
} }