summaryrefslogtreecommitdiff
path: root/src/sysdeps/trydirfd.c
blob: c2eccf27a9a7fee3512d26eab052c31d2d2936a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* ISC license. */

#undef _POSIX_C_SOURCE
#undef _XOPEN_SOURCE

#ifndef _NETBSD_SOURCE
#define _NETBSD_SOURCE
#endif
#ifndef __EXTENSIONS__
#define __EXTENSIONS__
#endif

#include <dirent.h>

int main (void)
{
  DIR *dir = opendir(".") ;
  return dirfd(dir) ;
}