source: npl/system/klibc/patches/klibc-ppc64-fix-struct-stat.patch @ 892871d

Last change on this file since 892871d 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
RevLine 
[c5c522c]1From: Aurelien Jarno <aurelien@aurel32.net>
2Date: Sat, 25 Apr 2015 14:16:16 +0200
3Subject: [PATCH] ppc64: fix struct stat
4Bug-Debian: https://bugs.debian.org/783292
5Forwarded: http://www.zytor.com/pipermail/klibc/2016-January/003881.html
6
7On ppc64 the struct stat defined by klibc matches the kernel one.
8However it contains implicit padding before the st_rdev field due to the
964-bit alignement. For internal reasons, klibc defines st_rdev as a pair
10of 32-bit values (using the __stdev64 macro). They only need to be
1132-bit aligned and as a consequence st->st_rdev is incorrectly defined.
12
13The solution is to add an explicit padding in the structure. This fixes
14the resume binary on ppc64 BE and LE, and probably other things.
15
16Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
17---
18 usr/include/arch/ppc64/klibc/archstat.h | 1 +
19 1 file changed, 1 insertion(+)
20
21--- a/usr/include/arch/ppc64/klibc/archstat.h
22+++ b/usr/include/arch/ppc64/klibc/archstat.h
23@@ -12,6 +12,7 @@ struct stat {
24        mode_t          st_mode;
25        uid_t           st_uid;
26        gid_t           st_gid;
27+       unsigned int    __pad1;
28        __stdev64       (st_rdev);
29        off_t           st_size;
30        unsigned long   st_blksize;
Note: See TracBrowser for help on using the repository browser.