LFS changes...

Rick Niles niles at scyld.com
Sat Apr 14 01:22:24 EST 2001


< This patch is against openssh-2.5.2p2 >

Here's a few lines we changed a while back in "scp.c" to get it to
transfer large (>2GB) file on a 32-bit system using LFS.  Obviously,
you don't want the line hard-coded in that sets _FILE_OFFSET_BIT=64,
but perhaps you could make it a configure option.  (Is it already
perhaps?)  

Do you agree that these lines are neccessary or not?  It does seem
that statbytes (number of bytes xfer'ed so far), must be an off_t
doesn't it?

	Thanks,
	Rick Niles.
	Scyld Computing Corporation

------------
diff -ur openssh-2.5.2p2.orig/scp.c openssh-2.5.2p2/scp.c
--- openssh-2.5.2p2.orig/scp.c	Sun Mar 18 22:09:40 2001
+++ openssh-2.5.2p2/scp.c	Thu Apr 12 22:20:38 2001
@@ -74,6 +74,7 @@
  *
  */
 
+#define _FILE_OFFSET_BITS 64
 #include "includes.h"
 RCSID("$OpenBSD: scp.c,v 1.61 2001/03/15 15:05:59 markus Exp $");
 
@@ -114,7 +115,7 @@
 static struct timeval start;
 
 /* Number of bytes of current file transferred so far. */
-volatile u_long statbytes;
+volatile off_t statbytes;
 
 /* Total size of current file. */
 off_t totalbytes = 0;
@@ -501,8 +502,8 @@
 	struct stat stb;
 	static BUF buffer;
 	BUF *bp;
-	off_t i;
-	int amt, fd, haderr, indx, result;
+	off_t i, amt, result;
+	int fd, haderr, indx;
 	char *last, *name, buf[2048];
 
 	for (indx = 0; indx < argc; ++indx) {



More information about the openssh-unix-dev mailing list