/*
 * read + readdir -> rpath alias expansion
 */

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

int main(void)
{
	int fd = open("/etc/hostname", O_RDONLY);
	if (fd >= 0) {
		char b[64];
		read(fd, b, sizeof b);
		close(fd);
	}
	DIR *d = opendir("/etc");
	if (d) {
		while (readdir(d)) {} closedir(d);
	}
	return 0;
}
