fix compile on freebsd 4.x

This commit is contained in:
Doug MacEachern 2005-12-31 18:43:09 +00:00
parent 7820b451cc
commit 526ee37bcb
2 changed files with 5 additions and 0 deletions

View File

@ -1269,6 +1269,7 @@ JNIEXPORT jlong SIGAR_JNI(ResourceLimit_INFINITY)
#ifdef WIN32
return 0x7fffffff;
#else
#include <sys/time.h>
#include <sys/resource.h>
return RLIM_INFINITY;
#endif

View File

@ -1028,6 +1028,10 @@ typedef struct {
#define RLIMIT_PSIZE (RLIM_NLIMITS+3)
#ifndef RLIMIT_AS
#define RLIMIT_AS RLIMIT_VMEM
#endif
static rlimit_field_t sigar_rlimits[] = {
{ RLIMIT_CPU, 1, RlimitOffsets(cpu) },
{ RLIMIT_FSIZE, 1024, RlimitOffsets(file_size) },