diff options
author | Pavel Chupin <pavel.v.chupin@intel.com> | 2013-09-20 18:46:42 +0400 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2013-10-03 17:31:50 -0700 |
commit | 1e52a54a47c00af689b7d8d503c4d69e53ae26fc (patch) | |
tree | 46580702630f0cda815f53916360a0ef09928127 /libc/bionic/statvfs.cpp | |
parent | 141029327cdc62629e248b3be1d7a58d4e9e5ba8 (diff) | |
download | bionic-1e52a54a47c00af689b7d8d503c4d69e53ae26fc.tar.gz |
x86_64: Fix get_tls and statvfs
* bionic_tls.h - Add x86_64 version of get_tls macro;
* statvfs.h - 64-bit kernels don't have __statfs64/__fstatfs64, applying
workaround;
Change-Id: I20d7ddad74c7b7243866373d0142da6627c08280
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
Diffstat (limited to 'libc/bionic/statvfs.cpp')
-rw-r--r-- | libc/bionic/statvfs.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libc/bionic/statvfs.cpp b/libc/bionic/statvfs.cpp index 5d5828149..39c9332a0 100644 --- a/libc/bionic/statvfs.cpp +++ b/libc/bionic/statvfs.cpp @@ -18,8 +18,15 @@ #include <sys/statfs.h> -extern "C" int __statfs64(const char*, size_t, struct statfs*); +// Paper over the fact that 32-bit kernels use fstatfs64/statfs64 with an extra argument, +// but 64-bit kernels don't have the "64" bit suffix or the extra size_t argument. +#if __LP64__ +# define __fstatfs64(fd,size,buf) fstatfs(fd,buf) +# define __statfs64(path,size,buf) statfs(path,buf) +#else extern "C" int __fstatfs64(int, size_t, struct statfs*); +extern "C" int __statfs64(const char*, size_t, struct statfs*); +#endif #define ST_VALID 0x0020 |