summaryrefslogtreecommitdiff
path: root/lib/libc/dirent/opendir.c
blob: 2e250024053c735d43d77209990926b02ebe873b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <__dirent.h>

#include <fcntl.h>
#include <unistd.h>
#include <dirent.h>

DIR *opendir(const char *dirname)
{
	int fildes = open(dirname, O_RDONLY);

	if (fildes < 0)
		return NULL;

	return fdopendir(fildes);
}