Skip to content

Commit 16e9bb9

Browse files
committed
[sanitizer_common] Make sanitizer_linux.cpp kernel_stat* handling Linux-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.
1 parent e8f07cd commit 16e9bb9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
// access stat from asm/stat.h, without conflicting with definition in
3636
// sys/stat.h, we use this trick. sparc64 is similar, using
3737
// syscall(__NR_stat64) and struct kernel_stat64.
38-
# if SANITIZER_MIPS64 || SANITIZER_SPARC64
38+
# if SANITIZER_LINUX && (SANITIZER_MIPS64 || SANITIZER_SPARC64)
3939
# include <asm/unistd.h>
4040
# include <sys/types.h>
4141
# define stat kernel_stat

0 commit comments

Comments
 (0)