[sanitizers] Define SANITIZER_INTERCEPTOR_HOOKS on FreeBSD
authorAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Wed, 17 Feb 2021 10:36:41 +0000 (10:36 +0000)
committerAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Wed, 17 Feb 2021 10:36:47 +0000 (10:36 +0000)
This fixes the weak_hooks.cpp test on FreeBSD. Since this feature appears
to be supported on almost all platforms, it might also make sense to turn
it into an opt-out list instead of being opt-in.

Reviewed By: krytarowski

Differential Revision: https://reviews.llvm.org/D96255

compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h

index b209583..9cff0ac 100644 (file)
 #define SANITIZER_INTERCEPT_CTERMID_R (SI_MAC || SI_FREEBSD || SI_SOLARIS)
 
 #define SANITIZER_INTERCEPTOR_HOOKS \
-  (SI_LINUX || SI_MAC || SI_WINDOWS || SI_NETBSD || SI_SOLARIS)
+  (SI_LINUX || SI_MAC || SI_WINDOWS || SI_NETBSD || SI_NETBSD || SI_SOLARIS)
 #define SANITIZER_INTERCEPT_RECV_RECVFROM SI_POSIX
 #define SANITIZER_INTERCEPT_SEND_SENDTO SI_POSIX
 #define SANITIZER_INTERCEPT_EVENTFD_READ_WRITE SI_LINUX