aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Carlier <devnexen@gmail.com>2018-12-29 00:17:21 +0000
committerDavid Carlier <devnexen@gmail.com>2018-12-29 00:17:21 +0000
commitadb5f1e3b56b94e560581fae9bd1b1cbda5588c5 (patch)
treebb89cd80b75a037b20cd30b0430c184f12e1b6f9 /compiler-rt/lib/sanitizer_common
parent[OPENMP][NVPTX]Added/fixed debugging messages, NFC. (diff)
downloadllvm-project-adb5f1e3b56b94e560581fae9bd1b1cbda5588c5.tar.gz
llvm-project-adb5f1e3b56b94e560581fae9bd1b1cbda5588c5.tar.bz2
llvm-project-adb5f1e3b56b94e560581fae9bd1b1cbda5588c5.zip
[Sanitizer] Enable getfsent api for Darwin
Reviewers: vitalybuka, kubamracek Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D56138 llvm-svn: 350138
Diffstat (limited to 'compiler-rt/lib/sanitizer_common')
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h2
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc2
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h1
3 files changed, 4 insertions, 1 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
index 0276bf15531c..a7a3ce2bd8ab 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
@@ -545,7 +545,7 @@
#define SANITIZER_INTERCEPT_SHA2 SI_NETBSD
#define SANITIZER_INTERCEPT_CDB SI_NETBSD
#define SANITIZER_INTERCEPT_VIS (SI_NETBSD || SI_FREEBSD)
-#define SANITIZER_INTERCEPT_GETFSENT (SI_FREEBSD || SI_NETBSD)
+#define SANITIZER_INTERCEPT_GETFSENT (SI_FREEBSD || SI_NETBSD || SI_MAC)
#define SANITIZER_INTERCEPT_ARC4RANDOM (SI_FREEBSD || SI_NETBSD)
#endif // #ifndef SANITIZER_PLATFORM_INTERCEPTORS_H
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
index 4403c245bdc3..1e7e22b87c4e 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
@@ -25,6 +25,7 @@
#endif
#include <arpa/inet.h>
#include <dirent.h>
+#include <fstab.h>
#include <grp.h>
#include <limits.h>
#include <net/if.h>
@@ -192,6 +193,7 @@ namespace __sanitizer {
unsigned struct_sched_param_sz = sizeof(struct sched_param);
unsigned struct_regex_sz = sizeof(regex_t);
unsigned struct_regmatch_sz = sizeof(regmatch_t);
+ unsigned struct_fstab_sz = sizeof(struct fstab);
#if SANITIZER_MAC && !SANITIZER_IOS
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
index 3c8c80021a58..7bb24cad8f4c 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
@@ -51,6 +51,7 @@ namespace __sanitizer {
extern unsigned struct_statfs64_sz;
extern unsigned struct_regex_sz;
extern unsigned struct_regmatch_sz;
+ extern unsigned struct_fstab_sz;
#if !SANITIZER_ANDROID
extern unsigned struct_statfs_sz;