On 04.06.2009 09:12, Ludwig Nussel wrote: > ... > So gcc 4.4 finally hit openSUSE as well. I use the attached patch to > make vdr compile. Seems to work fine too. The code that requires > those const casts is really ugly though. How about the attached change? Should apply to VDR 1.6 just as well. Klaus
--- svdrp.c 2009/06/06 13:42:52 2.4 +++ svdrp.c 2009/06/06 14:03:55 @@ -798,16 +798,17 @@ char RealFileName[PATH_MAX]; if (FileName) { if (grabImageDir) { - cString s; - char *slash = strrchr(FileName, '/'); + cString s(FileName); + FileName = s; + const char *slash = strrchr(FileName, '/'); if (!slash) { s = AddDirectory(grabImageDir, FileName); FileName = s; } slash = strrchr(FileName, '/'); // there definitely is one - *slash = 0; - char *r = realpath(FileName, RealFileName); - *slash = '/'; + cString t(s); + t.Truncate(slash - FileName); + char *r = realpath(t, RealFileName); if (!r) { LOG_ERROR_STR(FileName); Reply(501, "Invalid file name \"%s\"", FileName);
_______________________________________________ vdr mailing list vdr@xxxxxxxxxxx http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr