From 21ec9080dec00997d02921525ac8e21265ff68e8 Mon Sep 17 00:00:00 2001 From: "Sascha Kuehndel (InuSasha)" Date: Thu, 11 May 2017 18:24:37 +0200 Subject: [PATCH] vdr: fix gcc7 build --- .../vdr/patches/vdr-50_gcc-fixes.patch | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 packages/addons/addon-depends/vdr/patches/vdr-50_gcc-fixes.patch diff --git a/packages/addons/addon-depends/vdr/patches/vdr-50_gcc-fixes.patch b/packages/addons/addon-depends/vdr/patches/vdr-50_gcc-fixes.patch new file mode 100644 index 0000000000..2cfe643cd0 --- /dev/null +++ b/packages/addons/addon-depends/vdr/patches/vdr-50_gcc-fixes.patch @@ -0,0 +1,108 @@ +Backport from 2.3.3 + +diff -Naur vdr-2.2.0/diseqc.c vdr-2.2.0.fixed/diseqc.c +--- vdr-2.2.0/diseqc.c 2015-01-26 13:02:14.000000000 +0100 ++++ vdr-2.2.0.fixed/diseqc.c 2017-05-11 17:47:26.770740387 +0200 +@@ -253,10 +253,10 @@ + return result; + } + +-uint cDiseqc::SetScrFrequency(uint SatFrequency, const cScr *Scr, uint8_t *Codes) const ++int cDiseqc::SetScrFrequency(int SatFrequency, const cScr *Scr, uint8_t *Codes) const + { + if ((Codes[0] & 0xF0) == 0x70 ) { // EN50607 aka JESS +- uint t = SatFrequency == 0 ? 0 : (SatFrequency - 100); ++ int t = SatFrequency == 0 ? 0 : (SatFrequency - 100); + if (t < 2048 && Scr->Channel() >= 0 && Scr->Channel() < 32) { + Codes[1] = t >> 8 | Scr->Channel() << 3; + Codes[2] = t; +@@ -266,7 +266,7 @@ + } + } + else { // EN50494 aka Unicable +- uint t = SatFrequency == 0 ? 0 : (SatFrequency + Scr->UserBand() + 2) / 4 - 350; // '+ 2' together with '/ 4' results in rounding! ++ int t = SatFrequency == 0 ? 0 : (SatFrequency + Scr->UserBand() + 2) / 4 - 350; // '+ 2' together with '/ 4' results in rounding! + if (t < 1024 && Scr->Channel() >= 0 && Scr->Channel() < 8) { + Codes[3] = t >> 8 | (t == 0 ? 0 : scrBank << 2) | Scr->Channel() << 5; + Codes[4] = t; +@@ -399,7 +399,7 @@ + return NULL; + } + +-cDiseqc::eDiseqcActions cDiseqc::Execute(const char **CurrentAction, uchar *Codes, uint8_t *MaxCodes, const cScr *Scr, uint *Frequency) const ++cDiseqc::eDiseqcActions cDiseqc::Execute(const char **CurrentAction, uchar *Codes, uint8_t *MaxCodes, const cScr *Scr, int *Frequency) const + { + if (!*CurrentAction) + *CurrentAction = commands; +diff -Naur vdr-2.2.0/diseqc.h vdr-2.2.0.fixed/diseqc.h +--- vdr-2.2.0/diseqc.h 2013-06-12 13:52:17.000000000 +0200 ++++ vdr-2.2.0.fixed/diseqc.h 2017-05-11 17:46:02.381565779 +0200 +@@ -86,7 +86,7 @@ + mutable int scrBank; + char *commands; + bool parsing; +- uint SetScrFrequency(uint SatFrequency, const cScr *Scr, uint8_t *Codes) const; ++ int SetScrFrequency(int SatFrequency, const cScr *Scr, uint8_t *Codes) const; + int SetScrPin(const cScr *Scr, uint8_t *Codes) const; + const char *Wait(const char *s) const; + const char *GetPosition(const char *s) const; +@@ -96,7 +96,7 @@ + cDiseqc(void); + ~cDiseqc(); + bool Parse(const char *s); +- eDiseqcActions Execute(const char **CurrentAction, uchar *Codes, uint8_t *MaxCodes, const cScr *Scr, uint *Frequency) const; ++ eDiseqcActions Execute(const char **CurrentAction, uchar *Codes, uint8_t *MaxCodes, const cScr *Scr, int *Frequency) const; + ///< Parses the DiSEqC commands and returns the appropriate action code + ///< with every call. CurrentAction must be the address of a character pointer, + ///< which is initialized to NULL. This pointer is used internally while parsing +diff -Naur vdr-2.2.0/dvbdevice.c vdr-2.2.0.fixed/dvbdevice.c +--- vdr-2.2.0/dvbdevice.c 2017-05-11 17:49:21.744005466 +0200 ++++ vdr-2.2.0.fixed/dvbdevice.c 2017-05-11 17:40:40.052025008 +0200 +@@ -329,7 +329,7 @@ + void ClearEventQueue(void) const; + bool GetFrontendStatus(fe_status_t &Status) const; + cPositioner *GetPositioner(void); +- void ExecuteDiseqc(const cDiseqc *Diseqc, unsigned int *Frequency); ++ void ExecuteDiseqc(const cDiseqc *Diseqc, int *Frequency); + void ResetToneAndVoltage(void); + bool SetFrontend(void); + virtual void Action(void); +@@ -696,7 +696,7 @@ + return positioner; + } + +-void cDvbTuner::ExecuteDiseqc(const cDiseqc *Diseqc, unsigned int *Frequency) ++void cDvbTuner::ExecuteDiseqc(const cDiseqc *Diseqc, int *Frequency) + { + if (!lnbPowerTurnedOn) { + CHECK(ioctl(fd_frontend, FE_SET_VOLTAGE, SEC_VOLTAGE_13)); // must explicitly turn on LNB power +@@ -806,7 +806,7 @@ + + SETCMD(DTV_DELIVERY_SYSTEM, frontendType); + if (frontendType == SYS_DVBS || frontendType == SYS_DVBS2) { +- unsigned int frequency = channel.Frequency(); ++ int frequency = channel.Frequency(); + if (Setup.DiSEqC) { + if (const cDiseqc *diseqc = Diseqcs.Get(device->CardIndex() + 1, channel.Source(), frequency, dtp.Polarization(), &scr)) { + frequency -= diseqc->Lof(); +@@ -829,7 +829,7 @@ + } + else { + int tone = SEC_TONE_OFF; +- if (frequency < (unsigned int)Setup.LnbSLOF) { ++ if (frequency < Setup.LnbSLOF) { + frequency -= Setup.LnbFrequLo; + tone = SEC_TONE_OFF; + } +diff -Naur vdr-2.2.0/remux.c vdr-2.2.0.fixed/remux.c +--- vdr-2.2.0/remux.c 2017-05-11 17:49:21.740005437 +0200 ++++ vdr-2.2.0.fixed/remux.c 2017-05-11 17:38:29.322690063 +0200 +@@ -1627,7 +1627,7 @@ + Div += parser->IFrameTemporalReferenceOffset(); + if (Div <= 0) + Div = 1; +- uint32_t Delta = ptsValues[0] / Div; ++ int Delta = ptsValues[0] / Div; + // determine frame info: + if (isVideo) { + if (abs(Delta - 3600) <= 1)