diff options
author | Kamil Rytarowski <n54@gmx.com> | 2017-12-06 21:32:57 +0000 |
---|---|---|
committer | Kamil Rytarowski <n54@gmx.com> | 2017-12-06 21:32:57 +0000 |
commit | d4f4f7cd131af547f3d94219c1f486534fec2e60 (patch) | |
tree | be72aadd5637c6fdc2ee73d59663d1f4c55b3403 /lib/sanitizer_common/sanitizer_platform_limits_posix.h | |
parent | 7c9843b5d84b56cd622b13dadf19a9159a2355be (diff) |
Handle NetBSD symbol renaming in msan_interceptors.cc
Summary:
NetBSD renames symbols for historical and compat reasons.
Add required symbol renames in sanitizer_common_interceptors.inc:
- gettimeofday -> __gettimeofday50
- getrusage -> __getrusage50
- shmctl -> __shmctl50
Additionally handle sigaction symbol mangling.
Rename the function symbol in the file to SIGACTION_SYMNAME and define
it as __sigaction14 for NetBSD and sigaction for !NetBSD. We cannot use
simple renaming with the proprocessor, as there are valid fields named
sigaction and they must be left intact.
Sponsored by <The NetBSD Foundation>
Reviewers: joerg, eugenis, vitalybuka, dvyukov
Reviewed By: vitalybuka
Subscribers: kubamracek, llvm-commits, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D40766
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@319966 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_platform_limits_posix.h')
-rw-r--r-- | lib/sanitizer_common/sanitizer_platform_limits_posix.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/lib/sanitizer_common/sanitizer_platform_limits_posix.h index 4aa04f323..d8b72a9c8 100644 --- a/lib/sanitizer_common/sanitizer_platform_limits_posix.h +++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.h @@ -1498,6 +1498,8 @@ struct __sanitizer_cookie_io_functions_t { COMPILER_CHECK(offsetof(struct __sanitizer_##CLASS, MEMBER) == \ offsetof(struct CLASS, MEMBER)) +#define SIGACTION_SYMNAME sigaction + #endif // SANITIZER_FREEBSD || SANITIZER_LINUX || SANITIZER_MAC #endif |