source: npl/system/klibc/patches/klibc-ppc64-fix-struct-stat.patch @ 08cf024

Last change on this file since 08cf024 was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100644
File size: 1.1 KB
  • usr/include/arch/ppc64/klibc/archstat.h

    From: Aurelien Jarno <aurelien@aurel32.net>
    Date: Sat, 25 Apr 2015 14:16:16 +0200
    Subject: [PATCH] ppc64: fix struct stat
    Bug-Debian: https://bugs.debian.org/783292
    Forwarded: http://www.zytor.com/pipermail/klibc/2016-January/003881.html
    
    On ppc64 the struct stat defined by klibc matches the kernel one.
    However it contains implicit padding before the st_rdev field due to the
    64-bit alignement. For internal reasons, klibc defines st_rdev as a pair
    of 32-bit values (using the __stdev64 macro). They only need to be
    32-bit aligned and as a consequence st->st_rdev is incorrectly defined.
    
    The solution is to add an explicit padding in the structure. This fixes
    the resume binary on ppc64 BE and LE, and probably other things.
    
    Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
    ---
     usr/include/arch/ppc64/klibc/archstat.h | 1 +
     1 file changed, 1 insertion(+)
    
    a b struct stat { 
    1212        mode_t          st_mode;
    1313        uid_t           st_uid;
    1414        gid_t           st_gid;
     15        unsigned int    __pad1;
    1516        __stdev64       (st_rdev);
    1617        off_t           st_size;
    1718        unsigned long   st_blksize;
Note: See TracBrowser for help on using the repository browser.