Skip to content

Commit 9ec771b

Browse files
authored
[compiler-rt] Avoid depending on the libnvmm header for NetBSD (llvm#153534)
Use the system headers instead since we don't actually need anything from libnvmm; we only care about ioctls and related structures. This makes it possible to cross-compile TSan for NetBSD with `zig cc` which does not provide libnvmm when cross-compiling. I also removed a `term.h` include (ncurses) which appeared to be unnecessary and likewise prevented cross-compilation with `zig cc` from working.
1 parent 56ecaf4 commit 9ec771b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_netbsd.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,6 @@ struct urio_command {
498498
#include <md5.h>
499499
#include <rmd160.h>
500500
#include <soundcard.h>
501-
#include <term.h>
502501
#include <termios.h>
503502
#include <time.h>
504503
#include <ttyent.h>
@@ -515,7 +514,7 @@ struct urio_command {
515514
#include <stringlist.h>
516515

517516
#if defined(__x86_64__)
518-
#include <nvmm.h>
517+
#include <dev/nvmm/nvmm_ioctl.h>
519518
#endif
520519
// clang-format on
521520

0 commit comments

Comments
 (0)