[sanitizer] Fix build on FreeBSD RISC-V
authorAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Thu, 26 Aug 2021 10:11:56 +0000 (11:11 +0100)
committerAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Thu, 26 Aug 2021 11:05:37 +0000 (12:05 +0100)
commitb475ce39e8b1de3a70ea242473f136a567be46e3
treee2e9fc92c26032c9488e6801d67cc0c95d70ccc5
parentde15979bc32d761c9b5071fb7d28d7c04ebbfaf3
[sanitizer] Fix build on FreeBSD RISC-V

We have to avoid calling renameat2 and clone on FreeBSD.
Additionally, the mcontext structure has different members.

Reviewed By: jrtc27, luismarques

Differential Revision: https://reviews.llvm.org/D103886
compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp