uClibc doesn't provide wrappers for getdents() syscall either. The proper solution would be to use readdir()/scandir() instead I guess. Till then people interested can use this ad-hoc patch, which uses getdents() syscall directly. It shouldn't be applied to main repository I think.
Also join has some issues, I removed its entry from Makefile just to check if ls/du commands works. --- lib9/dirread.c.orig 2012-02-28 23:09:24.000000000 +0100 +++ lib9/dirread.c 2012-02-28 23:22:48.000000000 +0100 @@ -4,9 +4,25 @@ #include <sys/stat.h> #include <dirent.h> +#if defined(__UCLIBC__) +# include <sys/syscall.h> +# if defined(__USE_LARGEFILE64) +# define getdents SYS_getdents64 +# else +# define getdents SYS_getdents +# endif +#endif + extern int _p9dir(struct stat*, struct stat*, char*, Dir*, char**, char*); #if defined(__linux__) +# if defined(__UCLIBC__) +static int +mygetdents(int fd, struct dirent *buf, int n) +{ + return syscall(getdents, fd, (void*)buf, n); +} +# else static int mygetdents(int fd, struct dirent *buf, int n) { @@ -18,6 +34,7 @@ mygetdents(int fd, struct dirent *buf, i nn = getdirentries(fd, (void*)buf, n, &off); return nn; } +# endif #elif defined(__APPLE__) || defined(__FreeBSD__) static int mygetdents(int fd, struct dirent *buf, int n)