[all-commits] [llvm/llvm-project] b37912: [sanitizer] Remove #include <linux/fs.h> to resolv...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Mon Jul 11 11:38:42 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b379129c4beb3f26223288627a1291739f33af02
https://github.com/llvm/llvm-project/commit/b379129c4beb3f26223288627a1291739f33af02
Author: Fangrui Song <i at maskray.me>
Date: 2022-07-11 (Mon, 11 Jul 2022)
Changed paths:
M compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
Log Message:
-----------
[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.
Fix https://github.com/llvm/llvm-project/issues/56421
Reviewed By: #sanitizers, vitalybuka, zatrazz
Differential Revision: https://reviews.llvm.org/D129471
More information about the All-commits
mailing list