aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2016-01-06 00:44:16 +0000
committerH. Peter Anvin <hpa@linux.intel.com>2016-01-05 17:45:55 -0800
commitce358438679db7488f36706feaf64d6d5ab84ad6 (patch)
tree9920fc5566cc07062103a4d46241f6d06c19358c
parent75895304280f597f46551deb8b87c27ac18a013c (diff)
downloadklibc-ce358438679db7488f36706feaf64d6d5ab84ad6.tar.gz
[klibc] ppc64: fix struct stat
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> Link: http://lkml.kernel.org/r/20160106004416.GG28542@decadent.org.uk Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
-rw-r--r--usr/include/arch/ppc64/klibc/archstat.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/usr/include/arch/ppc64/klibc/archstat.h b/usr/include/arch/ppc64/klibc/archstat.h
index 918d81021b1a9..0bbbff3b53b58 100644
--- a/usr/include/arch/ppc64/klibc/archstat.h
+++ b/usr/include/arch/ppc64/klibc/archstat.h
@@ -12,6 +12,7 @@ struct stat {
mode_t st_mode;
uid_t st_uid;
gid_t st_gid;
+ unsigned int __pad1;
__stdev64 (st_rdev);
off_t st_size;
unsigned long st_blksize;