diff options
Diffstat (limited to 'net-p2p/ctorrent/files/ctorrent-1.3.4-dnh2-vfat.patch')
-rw-r--r-- | net-p2p/ctorrent/files/ctorrent-1.3.4-dnh2-vfat.patch | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/net-p2p/ctorrent/files/ctorrent-1.3.4-dnh2-vfat.patch b/net-p2p/ctorrent/files/ctorrent-1.3.4-dnh2-vfat.patch new file mode 100644 index 000000000000..102ae2462124 --- /dev/null +++ b/net-p2p/ctorrent/files/ctorrent-1.3.4-dnh2-vfat.patch @@ -0,0 +1,16 @@ +--- btfiles.cpp.orig Sun Jan 1 18:41:21 2006 ++++ btfiles.cpp Sun Mar 19 19:54:53 2006 +@@ -170,11 +170,13 @@ + return write(fd, &c, 1); + #else + // ftruncate() not allowed on [v]fat under linux +- if( ftruncate(fd,length) < 0 ) { ++ int retval = ftruncate(fd,length); ++ if( retval < 0 ) { + char c = (char)0; + if(lseek(fd,length - 1, SEEK_SET) < 0 ) return -1; + return write(fd, &c, 1); + } ++ else return retval; + #endif + } |