mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
vdr: Fix build with GCC 4.4.
This commit is contained in:
4
lfs/vdr
4
lfs/vdr
@@ -104,6 +104,10 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
cd $(DIR_APP)/PLUGINS/src && tar xvf $(DIR_DL)/$(DL_FILE4)
|
||||
cd $(DIR_APP)/PLUGINS/src && ln -s epgsearch-0.9.24 epgsearch
|
||||
cd $(DIR_APP) && patch -Np1 -i PLUGINS/src/epgsearch/patches/MainMenuHooks-v1_0.patch
|
||||
cd $(DIR_APP)/PLUGINS/src/epgsearch && sed -i '/include/a #include <langinfo.h>/' \
|
||||
epgsearch.c
|
||||
cd $(DIR_APP)/PLUGINS/src/epgsearch && patch -Np1 < $(DIR_SRC)/src/patches/vdr-plugin-epgsearch-gcc44.patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/vdr-1.6.0-gcc44-fixes.patch
|
||||
cd $(DIR_APP) && make VIDEODIR=/var/video plugins $(MAKETUNING) $(EXTRA_MAKE)
|
||||
cd $(DIR_APP) && make VIDEODIR=/var/video vdr $(MAKETUNING) $(EXTRA_MAKE)
|
||||
cd $(DIR_APP) && make DFB_SUPPORT=1 FB_SUPPORT=1 VIDIX_SUPPORT=1 $(MAKETUNING) $(EXTRA_MAKE)
|
||||
|
||||
62
src/patches/vdr-1.6.0-gcc44-fixes.patch
Normal file
62
src/patches/vdr-1.6.0-gcc44-fixes.patch
Normal file
@@ -0,0 +1,62 @@
|
||||
Index: vdr-1.6.0/recording.c
|
||||
===================================================================
|
||||
--- vdr-1.6.0.orig/recording.c
|
||||
+++ vdr-1.6.0/recording.c
|
||||
@@ -509,8 +509,8 @@ cRecording::cRecording(cTimer *Timer, co
|
||||
Utf8Strn0Cpy(SubtitleBuffer, Subtitle, MAX_SUBTITLE_LENGTH);
|
||||
Subtitle = SubtitleBuffer;
|
||||
}
|
||||
- char *macroTITLE = strstr(Timer->File(), TIMERMACRO_TITLE);
|
||||
- char *macroEPISODE = strstr(Timer->File(), TIMERMACRO_EPISODE);
|
||||
+ const char *macroTITLE = strstr(Timer->File(), TIMERMACRO_TITLE);
|
||||
+ const char *macroEPISODE = strstr(Timer->File(), TIMERMACRO_EPISODE);
|
||||
if (macroTITLE || macroEPISODE) {
|
||||
name = strdup(Timer->File());
|
||||
name = strreplace(name, TIMERMACRO_TITLE, Title);
|
||||
@@ -551,7 +551,7 @@ cRecording::cRecording(const char *FileN
|
||||
sortBuffer = NULL;
|
||||
fileName = strdup(FileName);
|
||||
FileName += strlen(VideoDirectory) + 1;
|
||||
- char *p = strrchr(FileName, '/');
|
||||
+ const char *p = strrchr(FileName, '/');
|
||||
|
||||
name = NULL;
|
||||
info = new cRecordingInfo;
|
||||
@@ -1022,7 +1022,8 @@ void cRecordings::DelByName(const char *
|
||||
if (recording) {
|
||||
cThreadLock DeletedRecordingsLock(&DeletedRecordings);
|
||||
Del(recording, false);
|
||||
- char *ext = strrchr(recording->FileName(), '.');
|
||||
+ // wtf?
|
||||
+ char *ext = strrchr(const_cast<char*>(recording->FileName()), '.');
|
||||
if (ext) {
|
||||
strncpy(ext, DELEXT, strlen(ext));
|
||||
recording->fileSizeMB = DirSizeMB(recording->FileName());
|
||||
Index: vdr-1.6.0/svdrp.c
|
||||
===================================================================
|
||||
--- vdr-1.6.0.orig/svdrp.c
|
||||
+++ vdr-1.6.0/svdrp.c
|
||||
@@ -736,7 +736,7 @@ void cSVDRP::CmdGRAB(const char *Option)
|
||||
char *strtok_next;
|
||||
FileName = strtok_r(p, delim, &strtok_next);
|
||||
// image type:
|
||||
- char *Extension = strrchr(FileName, '.');
|
||||
+ const char *Extension = strrchr(FileName, '.');
|
||||
if (Extension) {
|
||||
if (strcasecmp(Extension, ".jpg") == 0 || strcasecmp(Extension, ".jpeg") == 0)
|
||||
Jpeg = true;
|
||||
@@ -796,12 +796,12 @@ void cSVDRP::CmdGRAB(const char *Option)
|
||||
if (FileName) {
|
||||
if (grabImageDir) {
|
||||
cString s;
|
||||
- char *slash = strrchr(FileName, '/');
|
||||
+ char *slash = strrchr(const_cast<char*>(FileName), '/');
|
||||
if (!slash) {
|
||||
s = AddDirectory(grabImageDir, FileName);
|
||||
FileName = s;
|
||||
}
|
||||
- slash = strrchr(FileName, '/'); // there definitely is one
|
||||
+ slash = strrchr(const_cast<char*>(FileName), '/'); // there definitely is one
|
||||
*slash = 0;
|
||||
char *r = realpath(FileName, RealFileName);
|
||||
*slash = '/';
|
||||
78
src/patches/vdr-plugin-epgsearch-gcc44.patch
Normal file
78
src/patches/vdr-plugin-epgsearch-gcc44.patch
Normal file
@@ -0,0 +1,78 @@
|
||||
diff -urNad vdr-plugin-epgsearch-0.9.24~/epgsearchsvdrp.c vdr-plugin-epgsearch-0.9.24/epgsearchsvdrp.c
|
||||
--- vdr-plugin-epgsearch-0.9.24~/epgsearchsvdrp.c 2008-04-13 20:53:44.000000000 +0200
|
||||
+++ vdr-plugin-epgsearch-0.9.24/epgsearchsvdrp.c 2009-10-26 20:27:07.000000000 +0100
|
||||
@@ -742,12 +742,13 @@
|
||||
{
|
||||
if (*Option)
|
||||
{
|
||||
- char* pipePos = strchr(Option, '|');
|
||||
+ const char* pipePos = strchr(Option, '|');
|
||||
if (pipePos)
|
||||
{
|
||||
- *pipePos = 0;
|
||||
- const char* oldName = Option;
|
||||
- const char* newName = pipePos+1;
|
||||
+ int index = pipePos - Option;
|
||||
+ char* oldName = strdup(Option);
|
||||
+ *(oldName + index) = 0;
|
||||
+ const char* newName = oldName + index + 1;
|
||||
if (strlen(oldName) > 0 && strlen(newName) > 0)
|
||||
{
|
||||
cChannelGroup *changrp = ChannelGroups.GetGroupByName(Option);
|
||||
@@ -769,15 +770,18 @@
|
||||
}
|
||||
ChannelGroups.Save();
|
||||
SearchExts.Save();
|
||||
+ free(oldName);
|
||||
return cString::sprintf("renamed channel group '%s' to '%s'", oldName, newName);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
+ free(oldName);
|
||||
ReplyCode = 901;
|
||||
return cString::sprintf("channel group '%s' not defined", Option);
|
||||
}
|
||||
}
|
||||
+ free(oldName);
|
||||
}
|
||||
ReplyCode = 901;
|
||||
return cString("Error in channel group parameters");
|
||||
diff -urNad vdr-plugin-epgsearch-0.9.24~/epgsearchtools.c vdr-plugin-epgsearch-0.9.24/epgsearchtools.c
|
||||
--- vdr-plugin-epgsearch-0.9.24~/epgsearchtools.c 2008-04-13 20:53:42.000000000 +0200
|
||||
+++ vdr-plugin-epgsearch-0.9.24/epgsearchtools.c 2009-10-26 20:27:07.000000000 +0100
|
||||
@@ -743,7 +743,7 @@
|
||||
while(tmp)
|
||||
{
|
||||
// extract a single line
|
||||
- char* lf = strchr(tmp, '\n');
|
||||
+ const char* lf = strchr(tmp, '\n');
|
||||
char* line = NULL;
|
||||
if (lf)
|
||||
line = strndup(tmp, lf-tmp);
|
||||
diff -urNad vdr-plugin-epgsearch-0.9.24~/menu_dirselect.c vdr-plugin-epgsearch-0.9.24/menu_dirselect.c
|
||||
--- vdr-plugin-epgsearch-0.9.24~/menu_dirselect.c 2008-04-13 20:53:44.000000000 +0200
|
||||
+++ vdr-plugin-epgsearch-0.9.24/menu_dirselect.c 2009-10-26 20:27:07.000000000 +0100
|
||||
@@ -83,7 +83,7 @@
|
||||
return 1;
|
||||
do
|
||||
{
|
||||
- char* pos = strchr(szDir, '~');
|
||||
+ const char* pos = strchr(szDir, '~');
|
||||
if (pos)
|
||||
{
|
||||
iLevel++;
|
||||
diff -urNad vdr-plugin-epgsearch-0.9.24~/searchtimer_thread.c vdr-plugin-epgsearch-0.9.24/searchtimer_thread.c
|
||||
--- vdr-plugin-epgsearch-0.9.24~/searchtimer_thread.c 2008-04-28 18:22:31.000000000 +0200
|
||||
+++ vdr-plugin-epgsearch-0.9.24/searchtimer_thread.c 2009-10-26 20:27:28.000000000 +0100
|
||||
@@ -565,8 +565,8 @@
|
||||
if (!isempty(aux))
|
||||
{
|
||||
tmpaux = strdup(aux);
|
||||
- char* begin = strstr(aux, "<epgsearch>");
|
||||
- char* end = strstr(aux, "</epgsearch>");
|
||||
+ const char* begin = strstr(aux, "<epgsearch>");
|
||||
+ const char* end = strstr(aux, "</epgsearch>");
|
||||
if (begin && end)
|
||||
{
|
||||
if (begin == aux) strcpy(tmpaux, ""); else strn0cpy(tmpaux, aux, begin-aux+1);
|
||||
Reference in New Issue
Block a user