diff options
| author | Nick Desaulniers <nickdesaulniers@users.noreply.github.com> | 2023-12-13 08:39:39 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-13 08:39:39 -0800 |
| commit | eaa11526c873b65a9dc0aaf0ebaf66de3db8ed21 (patch) | |
| tree | ed082bd9c99e434ec6cbd349ab4e43d677c023e5 /libc/src/__support/File | |
| parent | d87191942dc4701fafd7e87f02305711a4fd22f2 (diff) | |
[libc] fix -Wmacro-redefined (#75261)
When building with compiler-rt enabled, warnings such as the following
are
observed:
llvm-project/llvm/build/projects/compiler-rt/../libc/include/llvm-libc-macros/linux/sys-stat-macros.h:46:9:
warning: 'S_IXOTH' macro redefined [-Wmacro-redefined]
#define S_IXOTH 00001
^
llvm-project/llvm/build/projects/compiler-rt/../libc/include/llvm-libc-macros/linux/fcntl-macros.h:61:9:
note: previous definition is here
#define S_IXOTH 01
^
It looks like we have these multiply defined. Deduplicate these flags;
users
should expect to find them in sys/stat.h. S_FIFO was wrong anyways
(should
have been S_IFIFO).
Diffstat (limited to 'libc/src/__support/File')
| -rw-r--r-- | libc/src/__support/File/linux/file.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libc/src/__support/File/linux/file.cpp b/libc/src/__support/File/linux/file.cpp index 2d4cea5b53c5..b84da64cbe63 100644 --- a/libc/src/__support/File/linux/file.cpp +++ b/libc/src/__support/File/linux/file.cpp @@ -17,6 +17,7 @@ #include <fcntl.h> // For mode_t and other flags to the open syscall #include <stdio.h> +#include <sys/stat.h> // For S_IS*, S_IF*, and S_IR* flags. #include <sys/syscall.h> // For syscall numbers namespace LIBC_NAMESPACE { |
