diff -Nru libpri-1.6.0/debian/changelog libpri-1.6.0/debian/changelog --- libpri-1.6.0/debian/changelog 2018-02-18 21:21:36.000000000 +0000 +++ libpri-1.6.0/debian/changelog 2020-11-23 08:44:38.000000000 +0000 @@ -1,3 +1,15 @@ +libpri (1.6.0-2) unstable; urgency=medium + + * Team upload. + + [ Tzafrir Cohen ] + * Remove Faidon from Uploaders + + [ Guillem Jover ] + * Fix FTBFS with GCC-10 (Closes: #957470) + + -- Bernhard Schmidt Mon, 23 Nov 2020 09:44:38 +0100 + libpri (1.6.0-1) unstable; urgency=medium * New upstream release diff -Nru libpri-1.6.0/debian/control libpri-1.6.0/debian/control --- libpri-1.6.0/debian/control 2018-02-18 21:19:15.000000000 +0000 +++ libpri-1.6.0/debian/control 2020-11-23 08:44:38.000000000 +0000 @@ -2,7 +2,7 @@ Priority: optional Section: libs Maintainer: Debian VoIP Team -Uploaders: Mark Purcell , Tzafrir Cohen , Faidon Liambotis , Jeremy Lainé +Uploaders: Mark Purcell , Tzafrir Cohen , Jeremy Lainé Build-Depends: debhelper (>= 10) Standards-Version: 4.1.3 Homepage: http://www.asterisk.org/ diff -Nru libpri-1.6.0/debian/patches/series libpri-1.6.0/debian/patches/series --- libpri-1.6.0/debian/patches/series 2018-02-18 21:19:16.000000000 +0000 +++ libpri-1.6.0/debian/patches/series 2020-11-23 08:44:38.000000000 +0000 @@ -1,3 +1,4 @@ enable-gcc-optimizations disable_dahdi typo.patch +zero-sized-members.patch diff -Nru libpri-1.6.0/debian/patches/zero-sized-members.patch libpri-1.6.0/debian/patches/zero-sized-members.patch --- libpri-1.6.0/debian/patches/zero-sized-members.patch 1970-01-01 00:00:00.000000000 +0000 +++ libpri-1.6.0/debian/patches/zero-sized-members.patch 2020-11-23 08:44:38.000000000 +0000 @@ -0,0 +1,86 @@ +Description: Fix zero-size struct member usage +Author: Guillem Jover + +These zero-members are not at the end of the struct, which is an old +convention/extension to implement flexible member arrays. In this case +it appears to be used as a replacement for unions. + +Replace this kind of usage with actual unions, to preserve the ABI. + +--- + pri_q921.h | 18 ++++++++++++------ + pri_q931.h | 18 ++++++++++-------- + 2 files changed, 22 insertions(+), 14 deletions(-) + +--- a/pri_q921.h ++++ b/pri_q921.h +@@ -115,8 +115,10 @@ typedef struct q921_s { + u_int8_t p_f:1; /* Poll/Final bit */ + u_int8_t n_r:7; /* Number Received */ + #endif +- u_int8_t data[0]; /* Any further data */ +- u_int8_t fcs[2]; /* At least an FCS */ ++ union { ++ u_int8_t data[0]; /* Any further data */ ++ u_int8_t fcs[2]; /* At least an FCS */ ++ }; + } __attribute__ ((packed)) q921_s; + + /* An Unnumbered Format frame */ +@@ -133,8 +135,10 @@ typedef struct q921_u { + u_int8_t p_f:1; /* Poll/Final bit */ + u_int8_t m3:3; /* Top 3 modifier bits */ + #endif +- u_int8_t data[0]; /* Any further data */ +- u_int8_t fcs[2]; /* At least an FCS */ ++ union { ++ u_int8_t data[0]; /* Any further data */ ++ u_int8_t fcs[2]; /* At least an FCS */ ++ }; + } __attribute__ ((packed)) q921_u; + + /* An Information frame */ +@@ -151,8 +155,10 @@ typedef struct q921_i { + u_int8_t p_f:1; /* Poll/Final bit */ + u_int8_t n_r:7; /* Number received */ + #endif +- u_int8_t data[0]; /* Any further data */ +- u_int8_t fcs[2]; /* At least an FCS */ ++ union { ++ u_int8_t data[0]; /* Any further data */ ++ u_int8_t fcs[2]; /* At least an FCS */ ++ }; + } q921_i; + + typedef union { +--- a/pri_q931.h ++++ b/pri_q931.h +@@ -36,18 +36,20 @@ typedef enum q931_mode { + PACKET_MODE + } q931_mode; + +-typedef struct q931_h { ++typedef union q931_h { + unsigned char raw[0]; +- u_int8_t pd; /* Protocol Discriminator */ ++ struct { ++ u_int8_t pd; /* Protocol Discriminator */ + #if __BYTE_ORDER == __BIG_ENDIAN +- u_int8_t x0:4; +- u_int8_t crlen:4;/*!< Call reference length */ ++ u_int8_t x0:4; ++ u_int8_t crlen:4;/*!< Call reference length */ + #else +- u_int8_t crlen:4;/*!< Call reference length */ +- u_int8_t x0:4; ++ u_int8_t crlen:4;/*!< Call reference length */ ++ u_int8_t x0:4; + #endif +- u_int8_t contents[0]; +- u_int8_t crv[3];/*!< Call reference value */ ++ u_int8_t contents[0]; ++ u_int8_t crv[3];/*!< Call reference value */ ++ }; + } __attribute__ ((packed)) q931_h; + +