Package: cvsnt Version: 2.5.04.3236-1 Severity: important Tags: patch Justification: fails to build from source User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu karmic ubuntu-patch
In Ubuntu, we've applied the attached patch to achieve the following: * Fix FTBFS with gcc-4.4: const char* conversion (LP: #428391). We thought you might be interested in doing the same. -- System Information: Debian Release: 5.0 APT prefers jaunty-updates APT policy: (500, 'jaunty-updates'), (500, 'jaunty-security'), (500, 'jaunty-proposed'), (500, 'jaunty-backports'), (500, 'jaunty') Architecture: i386 (i686) Kernel: Linux 2.6.28-15-generic (SMP w/2 CPU cores) Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
diff -u cvsnt-2.5.04.3236/debian/patches/00list cvsnt-2.5.04.3236/debian/patches/00list --- cvsnt-2.5.04.3236/debian/patches/00list +++ cvsnt-2.5.04.3236/debian/patches/00list @@ -2,0 +3 @@ +03_ftbfs_gcc-4.4.dpatch only in patch2: unchanged: --- cvsnt-2.5.04.3236.orig/debian/patches/03_ftbfs_gcc-4.4.dpatch +++ cvsnt-2.5.04.3236/debian/patches/03_ftbfs_gcc-4.4.dpatch @@ -0,0 +1,34 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 03_ftbfs_gcc-4.4.dpatch by Ilya Barygin <bary...@gmail.com> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +...@dpatch@ +diff -urNad cvsnt-2.5.04.3236~/src/filesubr.cpp cvsnt-2.5.04.3236/src/filesubr.cpp +--- cvsnt-2.5.04.3236~/src/filesubr.cpp 2006-08-18 01:33:30.000000000 +0400 ++++ cvsnt-2.5.04.3236/src/filesubr.cpp 2009-09-12 18:30:37.000000000 +0400 +@@ -1229,7 +1229,7 @@ + /* Return a pointer into PATH's last component. */ + const char *last_component (const char *path) + { +- char *last = strrchr (path, '/'); ++ const char *last = strrchr (path, '/'); + + if (last && (last != path)) + return last + 1; +diff -urNad cvsnt-2.5.04.3236~/src/rcs.cpp cvsnt-2.5.04.3236/src/rcs.cpp +--- cvsnt-2.5.04.3236~/src/rcs.cpp 2008-05-20 15:06:03.000000000 +0400 ++++ cvsnt-2.5.04.3236/src/rcs.cpp 2009-09-12 18:30:37.000000000 +0400 +@@ -5898,9 +5898,8 @@ + if(diffopts) + { + cvs::string fn; +- char *pathpos=NULL; +- if (rcsdiff_args.file!=NULL) +- pathpos=strpbrk(PATCH_NULL(rcsdiff_args.file),"\\/"); ++ const char *pathpos = (rcsdiff_args.file==NULL) ? NULL : ++ strpbrk(PATCH_NULL(rcsdiff_args.file),"\\/"); + if ((rcsdiff_args.file!=NULL)&&(pathpos!=NULL)) + cvs::sprintf(fn,80,"%s",rcsdiff_args.file); + else