From 9dbfec1d45cbfcda3287c64da72d2ec456f86f3d Mon Sep 17 00:00:00 2001 From: rtoy <rtoy> Date: Fri, 12 Nov 2010 16:53:17 +0000 Subject: [PATCH] Fix padding for stat64. st-pad2 was the wrong size to pad st-size to a 64-bit boundary. Add st-pad3 to make sure st-blocks is on a 64-bit boundary. Only a problem when cross-compiling from a different arch. The native compile correctly padded the fields. --- code/unix.lisp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/unix.lisp b/code/unix.lisp index c997f0a88..f374f4ed4 100644 --- a/code/unix.lisp +++ b/code/unix.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/unix.lisp,v 1.130 2010/04/20 17:57:45 rtoy Rel $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/unix.lisp,v 1.131 2010/11/12 16:53:17 rtoy Exp $") ;;; ;;; ********************************************************************** ;;; @@ -567,19 +567,20 @@ (def-alien-type nil (struct stat64 (st-dev dev-t) - (st-pad1 (array long 3)) + (st-pad1 (array long 3)) ; Pad so ino is 64-bit aligned (st-ino ino64-t) (st-mode unsigned-long) (st-nlink short) (st-uid uid-t) (st-gid gid-t) (st-rdev dev-t) - (st-pad2 (array long 2)) + (st-pad2 (array long 3)) ; Pad so size is 64-bit aligned (st-size off64-t) (st-atime (struct timestruc-t)) (st-mtime (struct timestruc-t)) (st-ctime (struct timestruc-t)) (st-blksize long) + (st-pad3 (array long 1)) ; Pad so blocks is 64-bit aligned (st-blocks blkcnt64-t) (st-fstype (array char 16)) (st-pad4 (array long 8)))) -- GitLab