vdr: Fix build with GCC 11

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2021-05-18 09:27:19 +00:00
committed by Arne Fitzenreiter
parent 3196d226c1
commit 40e9fa276e
2 changed files with 28 additions and 0 deletions

View File

@@ -41,6 +41,8 @@ PAK_VER = 12
DEPS = vdr_streamdev
CXXFLAGS += -std=c++11
MAKE_OPTIONS = \
PREFIX=/usr \
BINDIR=/usr/bin \
@@ -99,6 +101,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/vdr-2.4-gcc-11.patch
# Compile main package.
cd $(DIR_APP) && make $(MAKE_OPTIONS) $(MAKETUNING) vdr include-dir

View File

@@ -0,0 +1,24 @@
From 46b480c798c2d5f4acb8874f25e5129f2cf7f224 Mon Sep 17 00:00:00 2001
From: Klaus Schmidinger <vdr@tvdr.de>
Date: Wed, 16 Sep 2020 13:30:59 +0200
Subject: [PATCH] Fixed checking the return value of the Open() call in
cFileName::SetOffset()
diff --git a/recording.c b/recording.c
index 810ef80..1fc34cd 100644
--- a/recording.c
+++ b/recording.c
@@ -3025,8 +3025,8 @@ cUnbufferedFile *cFileName::SetOffset(int Number, off_t Offset)
}
// found a non existing file suffix
}
- if (Open() >= 0) {
- if (!record && Offset >= 0 && file && file->Seek(Offset, SEEK_SET) != Offset) {
+ if (Open()) {
+ if (!record && Offset >= 0 && file->Seek(Offset, SEEK_SET) != Offset) {
LOG_ERROR_STR(fileName);
return NULL;
}
--
2.26.2