aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2010-02-09 22:55:11 +0000
committerMåns Rullgård <mans@mansr.com>2010-02-09 22:55:11 +0000
commit0104b608ca588c7c4c8078650e34b63cbf9e9b4c (patch)
tree51705bc1cf9955c4f8d9230ff445fd1854122720
parent614d8911c6aaf8c9bf57fb080f42f7d0615a1918 (diff)
downloadffmpeg-0104b608ca588c7c4c8078650e34b63cbf9e9b4c.tar.gz
Check for setrlimit()
Originally committed as revision 21733 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--cmdutils.c2
-rwxr-xr-xconfigure2
2 files changed, 3 insertions, 1 deletions
diff --git a/cmdutils.c b/cmdutils.c
index 450ae3224f..24a8db2f1b 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -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))
diff --git a/configure b/configure
index 548c16ad66..732a8d057d 100755
--- a/configure
+++ b/configure
@@ -1043,6 +1043,7 @@ HAVE_LIST="
socklen_t
soundcard_h
poll_h
+ setrlimit
struct_addrinfo
struct_ipv6_mreq
struct_sockaddr_in6
@@ -2460,6 +2461,7 @@ check_func isatty
check_func ${malloc_prefix}memalign && enable memalign
check_func mkstemp
check_func ${malloc_prefix}posix_memalign && enable posix_memalign
+check_func setrlimit
check_func_headers io.h setmode
check_func_headers lzo/lzo1x.h lzo1x_999_compress
check_func_headers windows.h GetProcessTimes