MAXNAMLEN is a BSDism. Use the proper internal macros instead of !_POSIX_SOURCE. telldir and seekdir are XSI, scandir and alphasort are POSIX.1-2008, and scandirat is GNU. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>