From 6697ed34967343830178f8452e276ab0d94f08e0 Mon Sep 17 00:00:00 2001 From: Ed Marshall Date: Sat, 1 Feb 2020 22:26:48 -0800 Subject: [PATCH] [FIX] Fix multiple definitions with new -fno-common default in GCC 10 (#1226) * Fix multiple definitions with new -fno-common default in GCC 10 * Add GCC 10 fix to changelog --- docs/CHANGES.TXT | 1 + src/ccextractor.c | 3 +++ src/ccextractor.h | 4 ++-- src/lib_ccx/ccx_decoders_708.h | 4 ++-- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/CHANGES.TXT b/docs/CHANGES.TXT index 25f8c03a..ba2f1171 100644 --- a/docs/CHANGES.TXT +++ b/docs/CHANGES.TXT @@ -16,6 +16,7 @@ - Fix: lib_ccx.c: Initialize fatal error logging function before first usage in init_libraries - Fix: A few (minor) memory leaks around the code. - Fix: General code clean up / reformatting +- Fix: Fix multiple definitions with new -fno-common default in GCC 10 - Doc: Updated ccextractor.cnf.sample. 0.88 (2019-05-21) diff --git a/src/ccextractor.c b/src/ccextractor.c index a2fb0a24..8ed27936 100644 --- a/src/ccextractor.c +++ b/src/ccextractor.c @@ -9,6 +9,9 @@ License: GPL 2.0 volatile int terminate_asap = 0; +struct ccx_s_options ccx_options; +struct lib_ccx_ctx *signal_ctx; + void sigusr1_handler(int sig) { mprint("Caught SIGUSR1. Filename Change Requested\n"); diff --git a/src/ccextractor.h b/src/ccextractor.h index 4e9ae68f..e5cde305 100644 --- a/src/ccextractor.h +++ b/src/ccextractor.h @@ -41,8 +41,8 @@ char * api_param(struct ccx_s_options* api_options, int count); #endif -struct ccx_s_options ccx_options; -struct lib_ccx_ctx *signal_ctx; +extern struct ccx_s_options ccx_options; +extern struct lib_ccx_ctx *signal_ctx; //volatile int terminate_asap = 0; struct ccx_s_options* api_init_options(); diff --git a/src/lib_ccx/ccx_decoders_708.h b/src/lib_ccx/ccx_decoders_708.h index 324f3890..df52c600 100644 --- a/src/lib_ccx/ccx_decoders_708.h +++ b/src/lib_ccx/ccx_decoders_708.h @@ -371,7 +371,7 @@ void ccx_dtvcc_process_service_block(ccx_dtvcc_ctx *dtvcc, unsigned char *data, int data_length); -ccx_dtvcc_pen_color ccx_dtvcc_default_pen_color; -ccx_dtvcc_pen_attribs ccx_dtvcc_default_pen_attribs; +extern ccx_dtvcc_pen_color ccx_dtvcc_default_pen_color; +extern ccx_dtvcc_pen_attribs ccx_dtvcc_default_pen_attribs; #endif