forked from OSchip/llvm-project
[sanitizer] Make test compatible with Darwin
llvm-svn: 328467
This commit is contained in:
parent
6e8d99bbea
commit
48d19f6961
|
@ -2,4 +2,4 @@
|
|||
|
||||
#include <unistd.h>
|
||||
|
||||
int main(void) { return access("/root", F_OK); }
|
||||
int main(void) { return access("/dev/null", F_OK); }
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue