commit 371d9e72df4445af620413758b70796013a26aeb
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Wed Jun 3 01:33:33 2020 +0100
Fix building with -fno-common (default from GCC 10)
1342.patch | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
tvheadend.spec | 12 +++++++-----
2 files changed, 59 insertions(+), 5 deletions(-)
---
diff --git a/1342.patch b/1342.patch
new file mode 100644
index 0000000..8d5ef76
--- /dev/null
+++ b/1342.patch
@@ -0,0 +1,52 @@
+From bd92f1389f1aacdd08e913b0383a0ca9dc223153 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi(a)gentoo.org>
+Date: Fri, 15 May 2020 17:45:30 +0100
+Subject: [PATCH] Fix building with -fno-common (default from GCC 10)
+
+---
+ src/input.h | 4 ++--
+ src/input/mpegts.c | 2 ++
+ src/input/mpegts.h | 2 +-
+ 3 files changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/src/input.h b/src/input.h
+index a9c96df048..3dce355c6a 100644
+--- ./src/input.h
++++ ./src/input.h
+@@ -133,8 +133,8 @@ void tvh_hardware_delete ( tvh_hardware_t *th );
+ extern const idclass_t tvh_input_class;
+ extern const idclass_t tvh_input_instance_class;
+
+-tvh_input_list_t tvh_inputs;
+-tvh_hardware_list_t tvh_hardware;
++extern tvh_input_list_t tvh_inputs;
++extern tvh_hardware_list_t tvh_hardware;
+
+ #define TVH_INPUT_FOREACH(x) LIST_FOREACH(x, &tvh_inputs, ti_link)
+ #define TVH_HARDWARE_FOREACH(x) LIST_FOREACH(x, &tvh_hardware, th_link)
+diff --git a/src/input/mpegts.c b/src/input/mpegts.c
+index e02d491f19..fca4f34296 100644
+--- ./src/input/mpegts.c
++++ ./src/input/mpegts.c
+@@ -20,6 +20,8 @@
+ #include "mpegts/fastscan.h"
+ #include "memoryinfo.h"
+
++struct mpegts_listeners mpegts_listeners;
++
+ extern memoryinfo_t mpegts_input_queue_memoryinfo;
+ extern memoryinfo_t mpegts_input_table_memoryinfo;
+
+diff --git a/src/input/mpegts.h b/src/input/mpegts.h
+index 9dda3bacaa..9c4c57b73b 100644
+--- ./src/input/mpegts.h
++++ ./src/input/mpegts.h
+@@ -1149,7 +1149,7 @@ typedef struct mpegts_listener
+ void (*ml_mux_delete) (mpegts_mux_t *mm, void *p);
+ } mpegts_listener_t;
+
+-LIST_HEAD(,mpegts_listener) mpegts_listeners;
++extern LIST_HEAD(mpegts_listeners, mpegts_listener) mpegts_listeners;
+
+ #define mpegts_add_listener(ml)\
+ LIST_INSERT_HEAD(&mpegts_listeners, ml, ml_link)
diff --git a/tvheadend.spec b/tvheadend.spec
index 753c415..e141b4c 100644
--- a/tvheadend.spec
+++ b/tvheadend.spec
@@ -20,7 +20,7 @@
Name: tvheadend
Version: 4.2.8
-Release: 9%{?dist}
+Release: 10%{?dist}
Summary: TV streaming server and digital video recorder
License: GPLv3+
@@ -47,6 +47,8 @@ Patch6: %{name}-4.2.8-gcc9.patch
Patch7: %{name}-4.2.8-hdhomerun20190621.patch
# Fix build with GCC 10
Patch8: %{name}-4.2.8-gcc10.patch
+# Fix build with GCC 10 II
+Patch9:
https://github.com/tvheadend/tvheadend/pull/1342.patch
BuildRequires: bzip2
BuildRequires: gcc
@@ -139,10 +141,7 @@ done
%build
-# * 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"
+export CFLAGS="$RPM_OPT_FLAGS -Wno-attributes"
echo "%{version}-%{release}" >rpm/version
# Note: --disable-lib* correspond to options to build bundled FFmpeg
%configure \
@@ -238,6 +237,9 @@ exit 0
%changelog
+* Wed Jun 03 2020 Sérgio Basto <sergio(a)serjux.com> - 4.2.8-10
+- Fix building with -fno-common (default from GCC 10)
+
* Sat May 30 2020 Leigh Scott <leigh123linux(a)gmail.com> - 4.2.8-9
- Rebuild for python-3.9