Check for setrlimit()

Originally committed as revision 21733 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Måns Rullgård 2010-02-09 22:55:11 +00:00
parent 614d8911c6
commit 0104b608ca
2 changed files with 3 additions and 1 deletions

View file

@ -264,7 +264,7 @@ int opt_loglevel(const char *opt, const char *arg)
int opt_timelimit(const char *opt, const char *arg)
{
#if HAVE_SYS_RESOURCE_H
#if HAVE_SETRLIMIT
int lim = parse_number_or_die(opt, arg, OPT_INT64, 0, INT_MAX);
struct rlimit rl = { lim, lim + 1 };
if (setrlimit(RLIMIT_CPU, &rl))