commit 8f7322712b7ca6ce64479636951c25d76d8f579c
Author: Mohamed El Morabity <melmorabity(a)fedoraproject.org>
Date: Wed Mar 11 11:27:14 2020 +0100
Fix build with GCC 10
tvheadend-4.2.8-gcc10.patch | 26 ++++++++++++++++++++++++++
tvheadend.spec | 13 ++++++++-----
2 files changed, 34 insertions(+), 5 deletions(-)
---
diff --git a/tvheadend-4.2.8-gcc10.patch b/tvheadend-4.2.8-gcc10.patch
new file mode 100644
index 0000000..d9fc3d1
--- /dev/null
+++ b/tvheadend-4.2.8-gcc10.patch
@@ -0,0 +1,26 @@
+diff -up ./src/epggrab/module/xmltv.c.orig ./src/epggrab/module/xmltv.c
+--- ./src/epggrab/module/xmltv.c.orig 2019-01-12 09:58:47.000000000 +0100
++++ ./src/epggrab/module/xmltv.c 2020-03-11 10:32:50.940753193 +0100
+@@ -190,11 +190,12 @@ static void parse_xmltv_dd_progid
+ (epggrab_module_t *mod, const char *s, char **uri, char **suri,
+ epg_episode_num_t *epnum)
+ {
+- char buf[128];
+ if (strlen(s) < 2) return;
+
++ char* buf = (char *)malloc(strlen(s) + strlen(mod->id) + 13);
++ buf[strlen(s) + strlen(mod->id) + 12] = '\0';
+ /* Raw URI */
+- snprintf(buf, sizeof(buf)-1, "ddprogid://%s/%s", mod->id, s);
++ snprintf(buf, strlen(s) + strlen(mod->id) + 12, "ddprogid://%s/%s",
mod->id, s);
+
+ /* SH - series without episode id so ignore */
+ if (strncmp("SH", s, 2))
+@@ -212,6 +213,7 @@ static void parse_xmltv_dd_progid
+ if (buf[e+1]) sscanf(&buf[e+1], "%hu", &(epnum->e_num));
+ }
+ }
++ free(buf);
+ }
+
+ /**
diff --git a/tvheadend.spec b/tvheadend.spec
index 256494e..b8a983f 100644
--- a/tvheadend.spec
+++ b/tvheadend.spec
@@ -45,6 +45,8 @@ Patch5: %{name}-4.2.7-python3.patch
Patch6: %{name}-4.2.8-gcc9.patch
# Fix build with hdhomerun >= 20190621
Patch7: %{name}-4.2.8-hdhomerun20190621.patch
+# Fix build with GCC 10
+Patch8: %{name}-4.2.8-gcc10.patch
BuildRequires: bzip2
BuildRequires: gcc
@@ -137,9 +139,10 @@ done
%build
-#
https://github.com/FFmpeg/FFmpeg/commit/4361293
-# Force -fcommon until code fully supports GCC 10
-export CFLAGS="$RPM_OPT_FLAGS -Wno-attributes -fcommon"
+# * Use -Wno-attributes to fix
https://github.com/FFmpeg/FFmpeg/commit/4361293
+# * Force -fcommon and -Wno-error=stringop-truncation until code fully supports
+# GCC 10
+export CFLAGS="$RPM_OPT_FLAGS -Wno-attributes -fcommon
-Wno-error=stringop-truncation"
echo "%{version}-%{release}" >rpm/version
# Note: --disable-lib* correspond to options to build bundled FFmpeg
%configure \
@@ -235,9 +238,9 @@ exit 0
%changelog
-* Tue Mar 10 2020 Mohamed El Morabity <melmorabity(a)fedoraproject.org> - 4.2.8-7
+* Wed Mar 11 2020 Mohamed El Morabity <melmorabity(a)fedoraproject.org> - 4.2.8-7
- Fix build with hdhomerun >= 20190621
-- Disable -fno-common flag to allow building with GCC 10
+- Fix build with GCC 10
* Wed Feb 05 2020 RPM Fusion Release Engineering <leigh123linux(a)gmail.com> -
4.2.8-6
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild