diff options
author | Renato Golin <renato.golin@linaro.org> | 2015-02-24 11:38:41 +0000 |
---|---|---|
committer | Renato Golin <renato.golin@linaro.org> | 2015-02-24 11:38:41 +0000 |
commit | 1993c4969ac66331e14779e0af78af8ccbcba5b9 (patch) | |
tree | 90a02fe846b6b4af6115196dbad599e8d2e0b8ee /lib/sanitizer_common/sanitizer_common_syscalls.inc | |
parent | 7d4d51e563838608df2db5e77250990f8acf4f98 (diff) |
Allow sanitizer to work with "old" kernel headers
Sanitizers work on ancient kernels and were depending on types existing.
When those types were removed, the sanitizer build broke. See bug
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59009 for more information.
This patch fixes it by isolating the need for those types only when the
feature is actually needed, thus allowing one to compile the kernel with
or without that change, irrespective of its version.
Patch by Christophe Lyon.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@230324 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_common_syscalls.inc')
-rw-r--r-- | lib/sanitizer_common/sanitizer_common_syscalls.inc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sanitizer_common/sanitizer_common_syscalls.inc b/lib/sanitizer_common/sanitizer_common_syscalls.inc index 7e15d51ff..f2c054e2e 100644 --- a/lib/sanitizer_common/sanitizer_common_syscalls.inc +++ b/lib/sanitizer_common/sanitizer_common_syscalls.inc @@ -1443,6 +1443,7 @@ PRE_SYSCALL(fchown)(long fd, long user, long group) {} POST_SYSCALL(fchown)(long res, long fd, long user, long group) {} +#if SANITIZER_USES_UID16_SYSCALLS PRE_SYSCALL(chown16)(const void *filename, long user, long group) { if (filename) PRE_READ(filename, @@ -1552,6 +1553,7 @@ POST_SYSCALL(getgid16)(long res) {} PRE_SYSCALL(getegid16)() {} POST_SYSCALL(getegid16)(long res) {} +#endif // SANITIZER_USES_UID16_SYSCALLS PRE_SYSCALL(utime)(void *filename, void *times) {} |