Accepting request 745219 from devel:libraries:c_c++

OBS-URL: https://build.opensuse.org/request/show/745219
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/v4l-utils?expand=0&rev=35
This commit is contained in:
Dominique Leuenberger 2019-11-08 14:23:03 +00:00 committed by Git OBS Bridge
commit 4c5f6a155a
3 changed files with 31 additions and 0 deletions

24
v4l-utils-32bitfix.patch Normal file
View File

@ -0,0 +1,24 @@
Index: b/lib/libdvbv5/dvb-file.c
===================================================================
--- a/lib/libdvbv5/dvb-file.c
+++ b/lib/libdvbv5/dvb-file.c
@@ -589,7 +589,8 @@ static int fill_entry(struct dvb_entry *
n_prop = entry->n_props;
entry->props[n_prop].cmd = i;
if (!attr_name || !*attr_name)
- entry->props[n_prop].u.data = atol(value);
+ /* some put stream_id=4294967295 (-1) which is more than LONG_MAX on 32bit... */
+ entry->props[n_prop].u.data = (uint32_t)atoll(value);
else {
for (j = 0; attr_name[j]; j++)
if (!strcasecmp(value, attr_name[j]))
@@ -708,7 +709,8 @@ static int fill_entry(struct dvb_entry *
/* FIXME: this works only for integer values */
n_prop = entry->n_props;
entry->props[n_prop].cmd = cmd;
- entry->props[n_prop].u.data = atol(value);
+ /* some put stream_id=4294967295 (-1) which is more than LONG_MAX on 32bit... */
+ entry->props[n_prop].u.data = (uint32_t)atoll(value);
entry->n_props++;
return 0;

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Nov 4 13:37:03 UTC 2019 - Stefan Seyfried <seife+obs@b1-systems.com>
- add v4l-utils-32bitfix.patch (boo#1109541)
-------------------------------------------------------------------
Sat Sep 7 22:37:25 UTC 2019 - Stefan Brüns <stefan.bruens@rwth-aachen.de>

View File

@ -37,6 +37,7 @@ Source2: %{sname}.keyring
Source100: baselibs.conf
Patch0: sysmacros.patch
Patch1: use_system_v4l_for_qv4l.patch
Patch2: v4l-utils-32bitfix.patch
BuildRequires: gcc-c++
BuildRequires: libjpeg-devel
BuildRequires: pkgconfig
@ -198,6 +199,7 @@ qv4l2 is a test control and streaming test application for video4linux.
%setup -q -n %{sname}-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
%if "%{flavor}" == "qv4l2"