/* See LICENSE file for copyright and license details. */
+#include <errno.h>
#include <dirent.h>
-#include <err.h>
#include <stdio.h>
#include <string.h>
int num = 0;
if ((fd = opendir(dir)) == NULL) {
- warn("Failed to get number of files in directory %s", dir);
+ fprintf(stderr, "opendir '%s': %s\n", dir, strerror(errno));
return NULL;
}