Bug with Large Files on AIX

jw schultz jw at pegasys.ws
Wed May 14 21:56:36 EST 2003


Old issue.  Bug is in AIX libc and will be fixed by them.
Workaround is a tweak in config.h not in syscall.c
see the list archives.

On Wed, May 14, 2003 at 02:16:49PM +0200, Extern.Martin.Schaller at audi.de wrote:
> Hi,
> 
> on AIX, mkstemp doesn't open a file with the O_LARGEFILE option, so you
> can't transfer files > 2GB to an AIX machine.
> 
> Here is a fix:
> diff -c -r rsync-2.5.6.orig/syscall.c rsync-2.5.6/syscall.c
> *** rsync-2.5.6.orig/syscall.c  Sun Jan 26 21:09:02 2003
> --- rsync-2.5.6/syscall.c       Wed May 14 13:55:15 2003
> ***************
> *** 151,157 ****
>         if (dry_run) return -1;
>         if (read_only) {errno = EROFS; return -1;}
>   
> ! #if defined(HAVE_SECURE_MKSTEMP) && defined(HAVE_FCHMOD)
>         {
>                 int fd = mkstemp(template);
>                 if (fd == -1) return -1;
> --- 151,157 ----
>         if (dry_run) return -1;
>         if (read_only) {errno = EROFS; return -1;}
>   
> ! #if defined(HAVE_SECURE_MKSTEMP) && defined(HAVE_FCHMOD) && !defined(_AIX)
>         {
>                 int fd = mkstemp(template);
>                 if (fd == -1) return -1;
> ***************
> *** 164,170 ****
> --- 164,174 ----
>         }
>   #else
>         if (!mktemp(template)) return -1;
> + #if defined(O_LARGEFILE)
> +       return do_open(template, O_RDWR|O_EXCL|O_CREAT|O_LARGEFILE, perms);
> + #else
>         return do_open(template, O_RDWR|O_EXCL|O_CREAT, perms);
> + #endif
>   #endif
>   }
> 
> Regards,
> 
> Martin Schaller
> -- 
> To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
> Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
> 

-- 
________________________________________________________________
	J.W. Schultz            Pegasystems Technologies
	email address:		jw at pegasys.ws

		Remember Cernan and Schmitt



More information about the rsync mailing list