diff options
author | Fangrui Song <i@maskray.me> | 2022-07-11 12:53:34 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2022-07-11 12:53:35 -0700 |
commit | 9cf13067cb5088626ba7ee1ec4c42ec59c7995a0 (patch) | |
tree | d4554855de5bb3bda77b9df35b9b608a002825a5 /lldb/packages/Python/lldbsuite/test/gdbclientutils.py | |
parent | d2ce7e824df4d5fe78725770b264a22ac8f0677d (diff) | |
download | llvm-9cf13067cb5088626ba7ee1ec4c42ec59c7995a0.zip llvm-9cf13067cb5088626ba7ee1ec4c42ec59c7995a0.tar.gz llvm-9cf13067cb5088626ba7ee1ec4c42ec59c7995a0.tar.bz2 |
[sanitizer] Remove #include <linux/fs.h> to resolve fsconfig_command/mount_attr conflict with glibc 2.36
It is generally not a good idea to mix usage of glibc headers and Linux UAPI
headers (https://sourceware.org/glibc/wiki/Synchronizing_Headers). In glibc
since 7eae6a91e9b1670330c9f15730082c91c0b1d570 (milestone: 2.36), sys/mount.h
defines `fsconfig_command` which conflicts with linux/mount.h:
.../usr/include/linux/mount.h:95:6: error: redeclaration of ‘enum fsconfig_command’
Remove #include <linux/fs.h> which pulls in linux/mount.h. Expand its 4 macros manually.
Android sys/mount.h doesn't define BLKBSZGET and it still needs linux/fs.h.
In the long term we should move Linux specific definitions to sanitizer_platform_limits_linux.cpp
but this commit is easy to cherry pick into older compiler-rt releases.
Fix https://github.com/llvm/llvm-project/issues/56421
Reviewed By: #sanitizers, vitalybuka, zatrazz
Differential Revision: https://reviews.llvm.org/D129471
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/gdbclientutils.py')
0 files changed, 0 insertions, 0 deletions