cc -pipe -O -pthread -Wall -Wextra -Werror=implicit-function-declaration dirent/posix_getdents.c -o dirent/posix_getdents -D_GNU_SOURCE -D_BSD_SOURCE -D_ALL_SOURCE -D_DEFAULT_SOURCE -lm -lpthread -lrt -lrt -lcrypt dirent/posix_getdents.c: In function 'main': dirent/posix_getdents.c:20:23: error: invalid application of 'sizeof' to incomplete type 'struct posix_dent' size_t size = sizeof(struct posix_dent) + name_max + 1; ^~~~~~ dirent/posix_getdents.c:26:24: error: implicit declaration of function 'posix_getdents'; did you mean 'posix_openpt'? [-Werror=implicit-function-declaration] while ( 0 < (amount = posix_getdents(fd, buffer, size, 0)) ) ^~~~~~~~~~~~~~ posix_openpt dirent/posix_getdents.c:32:22: error: dereferencing pointer to incomplete type 'struct posix_dent' if ( !strcmp(entry->d_name, "dirent") ) ^~ cc1: some warnings being treated as errors