1// RUN: %clangxx -O0 -g %s -o %t && %run %t
2
3#include <stdio.h>
4#include <stdlib.h>
5#include <sys/stat.h>
6#include <unistd.h>
7
8int main(void) {
9 struct stat st;
10 char modep[15];
11
12 if (stat(file: "/etc/hosts", buf: &st))
13 exit(status: 1);
14
15 strmode(st.st_mode, modep);
16
17 printf(format: "%s\n", modep);
18
19 return 0;
20}
21

source code of compiler-rt/test/sanitizer_common/TestCases/NetBSD/strmode.cpp