From 03a909f4b6df7c4de218a7cbfaeb41d2ee5b146b Mon Sep 17 00:00:00 2001
From: Viktor Kutuzov <vkutuzov@accesssoftek.com>
Date: Thu, 7 May 2015 12:11:10 +0000
Subject: [PATCH] Intercept rand_r() on FreeBSD Committed unreviewed with
 premission.

llvm-svn: 236719
---
 .../lib/sanitizer_common/sanitizer_platform_interceptors.h     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
index 59bb67e66c15..58b35654827e 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
@@ -203,7 +203,8 @@
 #define SANITIZER_INTERCEPT_LGAMMA_R SI_FREEBSD || SI_LINUX
 #define SANITIZER_INTERCEPT_LGAMMAL_R SI_LINUX_NOT_ANDROID
 #define SANITIZER_INTERCEPT_DRAND48_R SI_LINUX_NOT_ANDROID
-#define SANITIZER_INTERCEPT_RAND_R SI_MAC || SI_LINUX_NOT_ANDROID
+#define SANITIZER_INTERCEPT_RAND_R \
+  SI_FREEBSD || SI_MAC || SI_LINUX_NOT_ANDROID
 #define SANITIZER_INTERCEPT_ICONV SI_FREEBSD || SI_LINUX_NOT_ANDROID
 #define SANITIZER_INTERCEPT_TIMES SI_NOT_WINDOWS