From 7bec1212c715871046108fc06c87091925981cdc Mon Sep 17 00:00:00 2001 From: Calin Juravle Date: Fri, 9 May 2014 22:28:09 +0100 Subject: [PATCH] Reserve space for the future in statvfs(64) The kernel struct has some spare space at the end too, and some extra fields, so having a bit of flexibility in statvfs might be worthwhile. Bug: 14681331 Bug: 12875898 Change-Id: I5b502c5dd9d2e3bb8f34804f83c02669cefce01e --- libc/include/sys/statvfs.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libc/include/sys/statvfs.h b/libc/include/sys/statvfs.h index 3d8179eb8..349554659 100644 --- a/libc/include/sys/statvfs.h +++ b/libc/include/sys/statvfs.h @@ -23,6 +23,12 @@ __BEGIN_DECLS +#ifdef __LP64__ +#define __STATVFS64_RESERVED uint32_t __f_reserved[6]; +#else +#define __STATVFS64_RESERVED +#endif + #define __STATVFS64_BODY \ unsigned long f_bsize; \ unsigned long f_frsize; \ @@ -35,10 +41,14 @@ __BEGIN_DECLS unsigned long f_fsid; \ unsigned long f_flag; \ unsigned long f_namemax; \ + __STATVFS64_RESERVED struct statvfs { __STATVFS64_BODY }; struct statvfs64 { __STATVFS64_BODY }; +#undef __STATVFS64_BODY +#undef __STATVFS64_RESERVED + #define ST_RDONLY 0x0001 #define ST_NOSUID 0x0002 #define ST_NODEV 0x0004