diff options
author | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-12-06 11:44:55 +0000 |
---|---|---|
committer | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-12-06 11:44:55 +0000 |
commit | e2691b3bc8334ed86e55c37776288efdedabd31f (patch) | |
tree | 33b176fac3187df8dee2ba08898b49ecea5c87f2 /libsanitizer | |
parent | d0e8b42e19303eaa9b433a341ac6d42c9ac945ed (diff) | |
download | gcc-e2691b3bc8334ed86e55c37776288efdedabd31f.tar.gz |
Include <sys/stat.h> if __x86_64__ is defined
* sanitizer_common/sanitizer_platform_limits_linux.cc: Include
<sys/stat.h>, instead of <asm/stat.h>, if __x86_64__ is defined.
(struct___old_kernel_stat_sz): Don't check if __x86_64__ is defined.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205736 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libsanitizer')
-rw-r--r-- | libsanitizer/ChangeLog | 6 | ||||
-rw-r--r-- | libsanitizer/sanitizer_common/sanitizer_platform_limits_linux.cc | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/libsanitizer/ChangeLog b/libsanitizer/ChangeLog index 5d02ec36e28..3e03d587660 100644 --- a/libsanitizer/ChangeLog +++ b/libsanitizer/ChangeLog @@ -1,3 +1,9 @@ +2013-12-06 H.J. Lu <hongjiu.lu@intel.com> + + * sanitizer_common/sanitizer_platform_limits_linux.cc: Include + <sys/stat.h>, instead of <asm/stat.h>, if __x86_64__ is defined. + (struct___old_kernel_stat_sz): Don't check if __x86_64__ is defined. + 2013-12-05 H.J. Lu <hongjiu.lu@intel.com> * configure.ac (link_sanitizer_common): Add -lm. diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_linux.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_linux.cc index 01de9c936c7..bc37df0df49 100644 --- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_linux.cc +++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_linux.cc @@ -27,6 +27,9 @@ // are not defined anywhere in userspace headers. Fake them. This seems to work // fine with newer headers, too. #include <asm/posix_types.h> +#if defined(__x86_64__) +#include <sys/stat.h> +#else #define ino_t __kernel_ino_t #define mode_t __kernel_mode_t #define nlink_t __kernel_nlink_t @@ -41,6 +44,7 @@ #undef uid_t #undef gid_t #undef off_t +#endif #include <linux/aio_abi.h> @@ -58,7 +62,7 @@ namespace __sanitizer { unsigned struct_statfs64_sz = sizeof(struct statfs64); } // namespace __sanitizer -#if !defined(__powerpc64__) +#if !defined(__powerpc64__) && !defined(__x86_64__) COMPILER_CHECK(struct___old_kernel_stat_sz == sizeof(struct __old_kernel_stat)); #endif |