[sanitizer] Make test compatible with Darwin

llvm-svn: 328467
This commit is contained in:
Vitaly Buka 2018-03-26 01:29:48 +00:00
parent 6e8d99bbea
commit 48d19f6961
2 changed files with 3 additions and 3 deletions

View File

@ -2,4 +2,4 @@
#include <unistd.h>
int main(void) { return access("/root", F_OK); }
int main(void) { return access("/dev/null", F_OK); }

View File

@ -9,7 +9,7 @@
int main(void) {
struct stat st;
char name[10];
char name[100];
mode_t type;
if (stat("/dev/null", &st))
@ -17,7 +17,7 @@ int main(void) {
type = S_ISCHR(st.st_mode) ? S_IFCHR : S_IFBLK;
if (devname_r(st.st_rdev, type, name, sizeof(name)))
if (!devname_r(st.st_rdev, type, name, sizeof(name)))
exit(1);
printf("%s\n", name);