1 // REQUIRES: linux 2 // RUN: %clangxx_msan -O0 %s -o %t && %run %t 3 4 #include <cassert> 5 #include <cstdlib> 6 #include <fcntl.h> 7 #include <sys/stat.h> 8 main(void)9int main(void) { 10 struct stat64 st; 11 int dirfd = open("/dev", O_RDONLY); 12 if (fstatat64(dirfd, "null", &st, 0)) 13 exit(1); 14 15 assert(S_ISCHR(st.st_mode)); 16 17 return 0; 18 } 19