xref: /llvm-project/compiler-rt/test/sanitizer_common/TestCases/NetBSD/user_from_uid.cpp (revision 74989aff5351beaeb03f46fc2fe57752d57f848b)
1 // RUN: %clangxx -O0 -g %s -o %t && %run %t
2 
3 #include <pwd.h>
4 #include <stdlib.h>
5 #include <string.h>
6 
main(void)7 int main(void) {
8   const char *nobody;
9 
10   if (!(nobody = user_from_uid(0, 0)))
11     exit(1);
12 
13   if (strlen(nobody))
14     exit(0);
15 
16   return 0;
17 }
18