[Sanitizer] Enable FTS api on FreeBSD

Reviewers: krytarowski, vitalybuka

Reviewed By: krytarowski

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

llvm-svn: 350090
This commit is contained in:
David Carlier 2018-12-27 12:56:54 +00:00
parent 796984d6c0
commit 018f505c9e
4 changed files with 8 additions and 1 deletions

View File

@ -524,7 +524,7 @@
#define SANITIZER_INTERCEPT_GETVFSSTAT SI_NETBSD
#define SANITIZER_INTERCEPT_REGEX (SI_NETBSD || SI_FREEBSD)
#define SANITIZER_INTERCEPT_REGEXSUB SI_NETBSD
#define SANITIZER_INTERCEPT_FTS SI_NETBSD
#define SANITIZER_INTERCEPT_FTS (SI_NETBSD || SI_FREEBSD)
#define SANITIZER_INTERCEPT_SYSCTL (SI_NETBSD || SI_FREEBSD || SI_MAC)
#define SANITIZER_INTERCEPT_ASYSCTL SI_NETBSD
#define SANITIZER_INTERCEPT_SYSCTLGETMIBINFO SI_NETBSD

View File

@ -18,6 +18,7 @@
#include <arpa/inet.h>
#include <dirent.h>
#include <fts.h>
#include <grp.h>
#include <limits.h>
#include <net/if.h>
@ -128,6 +129,8 @@ namespace __sanitizer {
unsigned struct_shm_info_sz = sizeof(struct shm_info);
unsigned struct_regmatch_sz = sizeof(regmatch_t);
unsigned struct_regex_sz = sizeof(regex_t);
unsigned struct_FTS_sz = sizeof(FTS);
unsigned struct_FTSENT_sz = sizeof(FTSENT);
const uptr sig_ign = (uptr)SIG_IGN;
const uptr sig_dfl = (uptr)SIG_DFL;

View File

@ -64,6 +64,8 @@ namespace __sanitizer {
extern unsigned struct_timespec_sz;
extern unsigned struct_regmatch_sz;
extern unsigned struct_regex_sz;
extern unsigned struct_FTS_sz;
extern unsigned struct_FTSENT_sz;
extern const int unvis_valid;
extern const int unvis_validpush;

View File

@ -1,4 +1,6 @@
// RUN: %clangxx -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s
//
// UNSUPPORTED: linux, darwin, solaris
#include <sys/param.h>
#include <sys/types.h>