From a238b452cc33655842997250fd62504f47fdc58e620a30d5bdab8a15490bf44c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 4 Nov 2019 15:50:27 +0000 Subject: [PATCH] Accepting request 745189 from home:seife:testing add v4l-utils-32bitfix.patch (boo#1109541) This fixes reproducible builds issue, 32bit generated wrong entry (STREAM_ID=0x7ffffff instead of =(unsigned)-1) OBS-URL: https://build.opensuse.org/request/show/745189 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/v4l-utils?expand=0&rev=63 --- v4l-utils-32bitfix.patch | 24 ++++++++++++++++++++++++ v4l-utils.changes | 5 +++++ v4l-utils.spec | 2 ++ 3 files changed, 31 insertions(+) create mode 100644 v4l-utils-32bitfix.patch diff --git a/v4l-utils-32bitfix.patch b/v4l-utils-32bitfix.patch new file mode 100644 index 0000000..37e0435 --- /dev/null +++ b/v4l-utils-32bitfix.patch @@ -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; diff --git a/v4l-utils.changes b/v4l-utils.changes index 26d5177..4ab173b 100644 --- a/v4l-utils.changes +++ b/v4l-utils.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Nov 4 13:37:03 UTC 2019 - Stefan Seyfried + +- add v4l-utils-32bitfix.patch (boo#1109541) + ------------------------------------------------------------------- Sat Sep 7 22:37:25 UTC 2019 - Stefan BrĂ¼ns diff --git a/v4l-utils.spec b/v4l-utils.spec index a70823e..cab631c 100644 --- a/v4l-utils.spec +++ b/v4l-utils.spec @@ -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"