From d52c491fec6cc27e54cd94f3fe5aa5f0c5888612 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 30 May 2014 13:30:56 +0200 Subject: tv: remove sysinfo() usage This call was used limited the buffer size if installed RAM was below 16 MB. This stopped being useful a decade ago. The check could also overflow on 32 bit systems. Just get rid of it. old-configure changes skipped when cherry-picking for stable. Conflicts: old-configure --- stream/tvi_v4l2.c | 10 ---------- wscript | 5 ----- 2 files changed, 15 deletions(-) diff --git a/stream/tvi_v4l2.c b/stream/tvi_v4l2.c index b6f77edf31..c7fba6a3e5 100644 --- a/stream/tvi_v4l2.c +++ b/stream/tvi_v4l2.c @@ -46,9 +46,6 @@ known issues: #include #include #include -#if HAVE_SYS_SYSINFO_H -#include -#endif #if HAVE_SYS_VIDEOIO_H #include #else @@ -1230,13 +1227,6 @@ static int get_capture_buffer_size(priv_t *priv) if (priv->tv_param->buffer_size >= 0) { bufsize = priv->tv_param->buffer_size*1024*1024; } else { -#if HAVE_SYS_SYSINFO_H - struct sysinfo si; - - sysinfo(&si); - bufsize = (si.freeram/2)*si.mem_unit; - if ( bufsize < 16*1024*1024) -#endif bufsize = 16*1024*1024; } diff --git a/wscript b/wscript index c7af0d3525..c99d72a3e5 100644 --- a/wscript +++ b/wscript @@ -187,11 +187,6 @@ iconv support use --disable-iconv.", 'name': 'setmode', 'desc': 'setmode()', 'func': check_statement('io.h', 'setmode(0, 0)') - }, { - 'name': 'sys-sysinfo-h', - 'desc': 'sys/sysinfo.h', - 'func': check_statement('sys/sysinfo.h', - 'struct sysinfo s_info; s_info.mem_unit=0; sysinfo(&s_info)') }, { 'name': '--libguess', 'desc': 'libguess support', -- cgit v1.2.3