}
#endif
-#if WITH_GETRLIMIT
-static int
-virProcessGetRLimit(int resource,
- struct rlimit *old_limit)
-{
- return getrlimit(resource, old_limit);
-}
-#endif /* WITH_GETRLIMIT */
-
-#if WITH_SETRLIMIT
-static int
-virProcessSetRLimit(int resource,
- const struct rlimit *new_limit)
-{
- return setrlimit(resource, new_limit);
-}
-#endif /* WITH_SETRLIMIT */
-
#if WITH_GETRLIMIT
static const char*
virProcessLimitResourceToLabel(int resource)
if (virProcessGetLimitFromProc(pid, resource, old_limit) == 0)
return 0;
- if (same_process && virProcessGetRLimit(resource, old_limit) == 0)
+ if (same_process && getrlimit(resource, old_limit) == 0)
return 0;
return -1;
if (virProcessPrLimit(pid, resource, new_limit, NULL) == 0)
return 0;
- if (same_process && virProcessSetRLimit(resource, new_limit) == 0)
+ if (same_process && setrlimit(resource, new_limit) == 0)
return 0;
return -1;