vdr-epgsearch: Fix FTBFS with GCC 11

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2021-05-18 09:27:53 +00:00
committed by Arne Fitzenreiter
parent 180cdb1ce6
commit db029f1f5e
2 changed files with 24 additions and 1 deletions

View File

@@ -41,7 +41,7 @@ VDRPLUGVER = 2.4.3
EXTRA_FLAGS= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
CFLAGS += $(EXTRA_FLAGS)
CXXFLAGS += $(EXTRA_FLAGS)
CXXFLAGS += $(EXTRA_FLAGS) -std=c++11
###############################################################################
# Top-level Rules
@@ -85,6 +85,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && patch -p1 < $(DIR_SRC)/src/patches/vdr-epgsearch-2.4.0-debian-paths.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/vdr-epgsearch-2.4.0-gcc1.patch
cd $(DIR_APP) && make $(MAKE_TUNING) LIBDIR=. VDRDIR=/usr/lib/vdr \
CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \

View File

@@ -0,0 +1,22 @@
--- vdr-plugin-epgsearch/epgsearchext.c.bak 2021-05-18 09:16:41.627381361 +0000
+++ vdr-plugin-epgsearch/epgsearchext.c 2021-05-18 09:16:51.650963022 +0000
@@ -1424,7 +1424,7 @@
int line = 0;
char buffer[MAXPARSEBUFFER];
result = true;
- while (fgets(buffer, sizeof(buffer), f) > 0) {
+ while (fgets(buffer, sizeof(buffer), f)) {
line++;
char *p = strchr(buffer, '#');
if (p == buffer) *p = 0;
--- vdr-plugin-epgsearch/createcats.c.bak 2021-05-18 09:19:49.987519874 +0000
+++ vdr-plugin-epgsearch/createcats.c 2021-05-18 09:19:58.591160769 +0000
@@ -68,7 +68,7 @@
char *cReadLine::Read(FILE *f)
{
- if (fgets(buffer, sizeof(buffer), f) > 0) {
+ if (fgets(buffer, sizeof(buffer), f)) {
int l = strlen(buffer) - 1;
if (l >= 0 && buffer[l] == '\n')
buffer[l] = 0;