1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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) 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); int lim = parse_number_or_die(opt, arg, OPT_INT64, 0, INT_MAX);
struct rlimit rl = { lim, lim + 1 }; struct rlimit rl = { lim, lim + 1 };
if (setrlimit(RLIMIT_CPU, &rl)) if (setrlimit(RLIMIT_CPU, &rl))

2
configure vendored
View File

@ -1043,6 +1043,7 @@ HAVE_LIST="
socklen_t socklen_t
soundcard_h soundcard_h
poll_h poll_h
setrlimit
struct_addrinfo struct_addrinfo
struct_ipv6_mreq struct_ipv6_mreq
struct_sockaddr_in6 struct_sockaddr_in6
@ -2460,6 +2461,7 @@ check_func isatty
check_func ${malloc_prefix}memalign && enable memalign check_func ${malloc_prefix}memalign && enable memalign
check_func mkstemp check_func mkstemp
check_func ${malloc_prefix}posix_memalign && enable posix_memalign check_func ${malloc_prefix}posix_memalign && enable posix_memalign
check_func setrlimit
check_func_headers io.h setmode check_func_headers io.h setmode
check_func_headers lzo/lzo1x.h lzo1x_999_compress check_func_headers lzo/lzo1x.h lzo1x_999_compress
check_func_headers windows.h GetProcessTimes check_func_headers windows.h GetProcessTimes