xref: /openbsd-src/lib/libc/gen/dirfd.c (revision 209e395206c9b2564b5720b7e81f09b0eb38e552)
194e5217dSmatthew /*
294e5217dSmatthew  * Written by Matthew Dempsky, 2011.
394e5217dSmatthew  * Public domain.
494e5217dSmatthew  */
594e5217dSmatthew 
694e5217dSmatthew #include <dirent.h>
7e55576caSmatthew #include "telldir.h"
894e5217dSmatthew 
994e5217dSmatthew int
dirfd(DIR * dirp)10e55576caSmatthew dirfd(DIR *dirp)
1194e5217dSmatthew {
1294e5217dSmatthew 	return (dirp->dd_fd);
1394e5217dSmatthew }
14*209e3952Sguenther DEF_WEAK(dirfd);
15