From 14bfba54a7633ca504c0dadc53cca37a4d2222a2 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Wed, 29 Dec 2021 23:41:35 +0100 Subject: [PATCH] fix compilation with modern gcc-11 This addresses missing 'extern'' declarations in header filesr /usr/bin/ld: lmsim.o:/space/home/laforge/projects/git/linmodem/v34priv.h:179: multiple definition of `trellis_trans_16'; lm.o:/space/home/laforge/projects/git/linmodem/v34priv.h:179: first defined here --- v34priv.h | 6 +++--- v90priv.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/v34priv.h b/v34priv.h index 1c11e41..ca1a638 100644 --- a/v34priv.h +++ b/v34priv.h @@ -174,9 +174,9 @@ typedef struct V34DSPState { int JP_received; } V34DSPState; -u8 trellis_trans_4[256][4]; -u8 trellis_trans_8[256][4]; -u8 trellis_trans_16[256][4]; +extern u8 trellis_trans_4[256][4]; +extern u8 trellis_trans_8[256][4]; +extern u8 trellis_trans_16[256][4]; /* V34 states */ enum { diff --git a/v90priv.h b/v90priv.h index c0e81f8..f99fbf8 100644 --- a/v90priv.h +++ b/v90priv.h @@ -38,8 +38,8 @@ typedef struct V90EncodeState { const s16 *ucode_to_linear; /* table to retrieve the linear values from ucodes */ } V90EncodeState; -const s16 v90_ulaw_ucode_to_linear[128]; -const s16 v90_alaw_ucode_to_linear[128]; +extern const s16 v90_ulaw_ucode_to_linear[128]; +extern const s16 v90_alaw_ucode_to_linear[128]; typedef struct V90DecodeState { struct sm_state *sm;