Skip to content

Commit

Permalink
[sanitizer_common] Make sanitizer_linux.cpp kernel_stat* handling Lin…
Browse files Browse the repository at this point in the history
…ux-specific

fcd6bd5 broke the Solaris/sparcv9 buildbot:
```
compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:39:14: fatal error: 'asm/unistd.h' file not found
   39 | #    include <asm/unistd.h>
      |              ^~~~~~~~~~~~~~
```
That section should have been Linux-specific in the first place, which is
what this patch does.

Tested on sparcv9-sun-solaris2.11.
  • Loading branch information
rorth committed Jul 30, 2024
1 parent e8f07cd commit 16e9bb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
// access stat from asm/stat.h, without conflicting with definition in
// sys/stat.h, we use this trick. sparc64 is similar, using
// syscall(__NR_stat64) and struct kernel_stat64.
# if SANITIZER_MIPS64 || SANITIZER_SPARC64
# if SANITIZER_LINUX && (SANITIZER_MIPS64 || SANITIZER_SPARC64)
# include <asm/unistd.h>
# include <sys/types.h>
# define stat kernel_stat
Expand Down

0 comments on commit 16e9bb9

Please sign in to comment.