summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Schwarzott <zzam@gentoo.org>2009-06-04 08:46:37 +0000
committerMatthias Schwarzott <zzam@gentoo.org>2009-06-04 08:46:37 +0000
commitf5c96501ef5799626d296cc666e0c682ad10afb0 (patch)
tree428a261c6271ce9f417abe49d1a463e0ae163b0d /media-video/vdr/files
parentChange root directory as daemon writes files in it, bug #267134. Also revbump... (diff)
downloadgentoo-2-f5c96501ef5799626d296cc666e0c682ad10afb0.tar.gz
gentoo-2-f5c96501ef5799626d296cc666e0c682ad10afb0.tar.bz2
gentoo-2-f5c96501ef5799626d296cc666e0c682ad10afb0.zip
Add patch to fix compiling with gcc-4.4. Bug #271617.
(Portage version: 2.1.6.13/cvs/Linux i686)
Diffstat (limited to 'media-video/vdr/files')
-rw-r--r--media-video/vdr/files/vdr-1.6.0-extensions-gcc-4.4.diff39
-rw-r--r--media-video/vdr/files/vdr-1.6.0-gcc-4.4.diff85
2 files changed, 124 insertions, 0 deletions
diff --git a/media-video/vdr/files/vdr-1.6.0-extensions-gcc-4.4.diff b/media-video/vdr/files/vdr-1.6.0-extensions-gcc-4.4.diff
new file mode 100644
index 000000000000..c4c9651707cd
--- /dev/null
+++ b/media-video/vdr/files/vdr-1.6.0-extensions-gcc-4.4.diff
@@ -0,0 +1,39 @@
+diff -ru vdr-1.6.0-orig/menu.c vdr-1.6.0/menu.c
+--- vdr-1.6.0-orig/menu.c 2009-06-04 10:01:37.538006043 +0200
++++ vdr-1.6.0/menu.c 2009-06-04 10:04:02.967985781 +0200
+@@ -2495,14 +2495,14 @@
+ priority = recording->priority;
+ lifetime = recording->lifetime;
+
+- char* p = strrchr(recording->Name(), '~');
++ const char* p = strrchr(recording->Name(), '~');
+ if (p) {
+ p++;
+ Utf8Strn0Cpy(name, p, sizeof(name));
+ Utf8Strn0Cpy(path, recording->Name(), sizeof(path));
+- p = strrchr(path, '~');
+- if (p)
+- p[0] = 0;
++ char* p2 = strrchr(path, '~');
++ if (p2)
++ p2[0] = 0;
+ }
+ else {
+ Utf8Strn0Cpy(name, recording->Name(), sizeof(name));
+diff -ru vdr-1.6.0-orig/videodir.c vdr-1.6.0/videodir.c
+--- vdr-1.6.0-orig/videodir.c 2009-06-04 10:01:37.531340365 +0200
++++ vdr-1.6.0/videodir.c 2009-06-04 10:22:20.074546524 +0200
+@@ -196,9 +196,10 @@
+ #ifdef USE_HARDLINKCUTTER
+ static bool StatNearestDir(const char *FileName, struct stat *Stat)
+ {
+- cString Name(FileName);
++ char *Name = strdup(FileName);
++ cString Name_str(Name, true); /* manage free for us */
+ char *p;
+- while ((p = strrchr((const char*)Name + 1, '/')) != NULL) {
++ while ((p = strrchr(Name + 1, '/')) != NULL) {
+ *p = 0; // truncate at last '/'
+ if (stat(Name, Stat) == 0) {
+ isyslog("StatNearestDir: Stating %s", (const char*)Name);
+
diff --git a/media-video/vdr/files/vdr-1.6.0-gcc-4.4.diff b/media-video/vdr/files/vdr-1.6.0-gcc-4.4.diff
new file mode 100644
index 000000000000..23eb78ec3b8c
--- /dev/null
+++ b/media-video/vdr/files/vdr-1.6.0-gcc-4.4.diff
@@ -0,0 +1,85 @@
+diff -ru vdr-1.6.0-orig/channels.c vdr-1.6.0/channels.c
+--- vdr-1.6.0-orig/channels.c 2009-06-04 10:34:56.144472994 +0200
++++ vdr-1.6.0/channels.c 2009-06-04 10:34:33.341139740 +0200
+@@ -574,7 +574,7 @@
+ }
+ else
+ q += sprintf(q, " none");
+- dsyslog(buffer);
++ dsyslog("%s", buffer);
+ }
+
+ void cChannel::SetRefChannel(cChannel *RefChannel)
+diff -ru vdr-1.6.0-orig/receiver.c vdr-1.6.0/receiver.c
+--- vdr-1.6.0-orig/receiver.c 2009-06-04 10:34:46.547807527 +0200
++++ vdr-1.6.0/receiver.c 2009-06-04 10:35:26.074465985 +0200
+@@ -40,7 +40,7 @@
+ {
+ if (device) {
+ const char *msg = "ERROR: cReceiver has not been detached yet! This is a design fault and VDR will segfault now!";
+- esyslog(msg);
++ esyslog("%s", msg);
+ fprintf(stderr, "%s\n", msg);
+ *(char *)0 = 0; // cause a segfault
+ }
+diff -ru vdr-1.6.0-orig/recording.c vdr-1.6.0/recording.c
+--- vdr-1.6.0-orig/recording.c 2009-06-04 10:34:56.141139523 +0200
++++ vdr-1.6.0/recording.c 2009-06-04 10:34:33.337807723 +0200
+@@ -509,8 +509,8 @@
+ 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 @@
+ 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 @@
+ 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());
+diff -ru vdr-1.6.0-orig/svdrp.c vdr-1.6.0/svdrp.c
+--- vdr-1.6.0-orig/svdrp.c 2009-06-04 10:34:56.141139523 +0200
++++ vdr-1.6.0/svdrp.c 2009-06-04 10:34:33.337807723 +0200
+@@ -736,7 +736,7 @@
+ 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 @@
+ 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 = '/';
+