diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2014-02-10 08:00:24 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2014-02-10 08:00:24 +0000 |
commit | 7608d2a50bf5173955732b5e53f6ea30550430df (patch) | |
tree | c11c94d91489ea1890417b58c3136ba8172df18c /lib/sanitizer_common | |
parent | 351bee4d06f1f8b6f83fe3c918677cb6c77f2bab (diff) |
[sanitizer] struct ustat and a bunch of other definitions are missing on Android.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201068 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common')
-rw-r--r-- | lib/sanitizer_common/sanitizer_common_syscalls.inc | 2 | ||||
-rw-r--r-- | lib/sanitizer_common/sanitizer_platform_limits_posix.cc | 2 | ||||
-rw-r--r-- | lib/sanitizer_common/sanitizer_platform_limits_posix.h | 18 |
3 files changed, 12 insertions, 10 deletions
diff --git a/lib/sanitizer_common/sanitizer_common_syscalls.inc b/lib/sanitizer_common/sanitizer_common_syscalls.inc index 069eb6dec..7b0e80d0c 100644 --- a/lib/sanitizer_common/sanitizer_common_syscalls.inc +++ b/lib/sanitizer_common/sanitizer_common_syscalls.inc @@ -920,6 +920,7 @@ POST_SYSCALL(newfstat)(long res, long fd, void *statbuf) { } } +#if !SANITIZER_ANDROID PRE_SYSCALL(ustat)(long dev, void *ubuf) {} POST_SYSCALL(ustat)(long res, long dev, void *ubuf) { @@ -927,6 +928,7 @@ POST_SYSCALL(ustat)(long res, long dev, void *ubuf) { if (ubuf) POST_WRITE(ubuf, struct_ustat_sz); } } +#endif // !SANITIZER_ANDROID PRE_SYSCALL(stat64)(const void *filename, void *statbuf) { if (filename) diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc index a1385fde3..fc8e1ed80 100644 --- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc +++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc @@ -169,10 +169,10 @@ namespace __sanitizer { unsigned struct_old_utsname_sz = sizeof(struct old_utsname); unsigned struct_oldold_utsname_sz = sizeof(struct oldold_utsname); unsigned struct_itimerspec_sz = sizeof(struct itimerspec); - unsigned struct_ustat_sz = sizeof(struct ustat); #endif // SANITIZER_LINUX #if SANITIZER_LINUX && !SANITIZER_ANDROID + unsigned struct_ustat_sz = sizeof(struct ustat); unsigned struct_rlimit64_sz = sizeof(struct rlimit64); unsigned struct_timex_sz = sizeof(struct timex); unsigned struct_msqid_ds_sz = sizeof(struct msqid_ds); diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/lib/sanitizer_common/sanitizer_platform_limits_posix.h index 5eb5df553..a726a702c 100644 --- a/lib/sanitizer_common/sanitizer_platform_limits_posix.h +++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.h @@ -78,21 +78,17 @@ namespace __sanitizer { // More fields that vary with the kernel version. }; - extern unsigned struct_utimbuf_sz; - extern unsigned struct_new_utsname_sz; - extern unsigned struct_old_utsname_sz; - extern unsigned struct_oldold_utsname_sz; - extern unsigned struct_msqid_ds_sz; - extern unsigned struct_mq_attr_sz; - extern unsigned struct_timex_sz; - extern unsigned struct_ustat_sz; - extern unsigned struct_rlimit_sz; extern unsigned struct_epoll_event_sz; extern unsigned struct_sysinfo_sz; extern unsigned struct_timespec_sz; extern unsigned __user_cap_header_struct_sz; extern unsigned __user_cap_data_struct_sz; + extern unsigned struct_utimbuf_sz; + extern unsigned struct_new_utsname_sz; + extern unsigned struct_old_utsname_sz; + extern unsigned struct_oldold_utsname_sz; + const unsigned old_sigset_t_sz = sizeof(unsigned long); const unsigned struct_kexec_segment_sz = 4 * sizeof(unsigned long); @@ -134,7 +130,11 @@ namespace __sanitizer { #endif // SANITIZER_LINUX #if SANITIZER_LINUX && !SANITIZER_ANDROID + extern unsigned struct_ustat_sz; extern unsigned struct_rlimit64_sz; + extern unsigned struct_timex_sz; + extern unsigned struct_msqid_ds_sz; + extern unsigned struct_mq_attr_sz; extern unsigned struct_statvfs_sz; extern unsigned struct_statvfs64_sz; |