diff --git a/lfs/vdr b/lfs/vdr index 9f36bdc8f..a3eebfacd 100644 --- a/lfs/vdr +++ b/lfs/vdr @@ -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 diff --git a/src/patches/vdr-2.4-gcc-11.patch b/src/patches/vdr-2.4-gcc-11.patch new file mode 100644 index 000000000..1c56b5a83 --- /dev/null +++ b/src/patches/vdr-2.4-gcc-11.patch @@ -0,0 +1,24 @@ +From 46b480c798c2d5f4acb8874f25e5129f2cf7f224 Mon Sep 17 00:00:00 2001 +From: Klaus Schmidinger +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 +