commit d759873574661359ec34769ef6461c30aa6554dd
Author: Mohamed El Morabity <melmorabity(a)fedoraproject.org>
Date: Tue Mar 12 16:16:05 2019 +0100
Fix build with GCC 9
tvheadend-4.2.8-gcc9.patch | 36 ++++++++++++++++++++++++++++++++++++
tvheadend.spec | 9 ++++++++-
2 files changed, 44 insertions(+), 1 deletion(-)
---
diff --git a/tvheadend-4.2.8-gcc9.patch b/tvheadend-4.2.8-gcc9.patch
new file mode 100644
index 0000000..9ccadb4
--- /dev/null
+++ b/tvheadend-4.2.8-gcc9.patch
@@ -0,0 +1,36 @@
+diff -up ./src/plumbing/transcoding.c.orig ./src/plumbing/transcoding.c
+--- ./src/plumbing/transcoding.c.orig 2019-01-12 09:58:47.000000000 +0100
++++ ./src/plumbing/transcoding.c 2019-03-12 15:49:24.922314869 +0100
+@@ -1804,7 +1804,7 @@ transcoder_init_video(transcoder_t *t, s
+ char *str, *token, *saveptr, codec_list[sizeof(tp->tp_src_vcodec)];
+ int codec_match=0;
+
+- strncpy(codec_list, tp->tp_src_vcodec, sizeof(tp->tp_src_vcodec)-1);
++ memcpy(codec_list, tp->tp_src_vcodec, sizeof(tp->tp_src_vcodec)-1);
+
+ tvhtrace(LS_TRANSCODE, "src_vcodec=\"%s\" ssc_type=%d (%s)\n",
+ tp->tp_src_vcodec,
+@@ -2130,10 +2130,10 @@ transcoder_set_properties(streaming_targ
+ transcoder_t *t = (transcoder_t *)st;
+ transcoder_props_t *tp = &t->t_props;
+
+- strncpy(tp->tp_vcodec, props->tp_vcodec, sizeof(tp->tp_vcodec)-1);
+- strncpy(tp->tp_vcodec_preset, props->tp_vcodec_preset,
sizeof(tp->tp_vcodec_preset)-1);
+- strncpy(tp->tp_acodec, props->tp_acodec, sizeof(tp->tp_acodec)-1);
+- strncpy(tp->tp_scodec, props->tp_scodec, sizeof(tp->tp_scodec)-1);
++ memcpy(tp->tp_vcodec, props->tp_vcodec, sizeof(tp->tp_vcodec)-1);
++ memcpy(tp->tp_vcodec_preset, props->tp_vcodec_preset,
sizeof(tp->tp_vcodec_preset)-1);
++ memcpy(tp->tp_acodec, props->tp_acodec, sizeof(tp->tp_acodec)-1);
++ memcpy(tp->tp_scodec, props->tp_scodec, sizeof(tp->tp_scodec)-1);
+ tp->tp_channels = props->tp_channels;
+ tp->tp_vbitrate = props->tp_vbitrate;
+ tp->tp_abitrate = props->tp_abitrate;
+@@ -2141,7 +2141,7 @@ transcoder_set_properties(streaming_targ
+
+ memcpy(tp->tp_language, props->tp_language, 4);
+
+- strncpy(tp->tp_src_vcodec, props->tp_src_vcodec,
sizeof(tp->tp_src_vcodec)-1);
++ memcpy(tp->tp_src_vcodec, props->tp_src_vcodec,
sizeof(tp->tp_src_vcodec)-1);
+ }
+
+
diff --git a/tvheadend.spec b/tvheadend.spec
index 5d461b7..8f4ee4d 100644
--- a/tvheadend.spec
+++ b/tvheadend.spec
@@ -20,7 +20,7 @@
Name: tvheadend
Version: 4.2.8
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: TV streaming server and digital video recorder
License: GPLv3+
@@ -41,6 +41,8 @@ Patch3: %{name}-4.2.2-dtv_scan_tables.patch
Patch4: %{name}-4.2.1-crypto_policies.patch
# Python 3 fixes for Python bindings
Patch5: %{name}-4.2.7-python3.patch
+# Fix build with GCC 9
+Patch6: %{name}-4.2.8-gcc9.patch
BuildRequires: bzip2
BuildRequires: gcc
@@ -133,6 +135,8 @@ done
%build
+#
https://github.com/FFmpeg/FFmpeg/commit/4361293
+export CFLAGS="$RPM_OPT_FLAGS -Wno-attributes"
echo "%{version}-%{release}" >rpm/version
# Note: --disable-lib* correspond to options to build bundled FFmpeg
%configure \
@@ -228,6 +232,9 @@ exit 0
%changelog
+* Tue Mar 12 2019 Mohamed El Morabity <melmorabity(a)fedoraproject.org> - 4.2.8-3
+- Fix build with GCC 9
+
* Mon Mar 04 2019 RPM Fusion Release Engineering <leigh123linux(a)gmail.com> -
4.2.8-2
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild