Mercurial > gnulib
diff lib/fts.c @ 17642:8af917141d49
fts: avoid unnecessary strlen calls
Not all platforms have _D_EXACT_NAMLEN.
* lib/fts.c (_D_EXACT_NAMLEN): Restore definition when needed.
Signed-off-by: Eric Blake <eblake@redhat.com>
author | Eric Blake <eblake@redhat.com> |
---|---|
date | Wed, 09 Apr 2014 10:20:08 -0600 |
parents | 019200939aa7 |
children | dffad0ca4bc1 |
line wrap: on
line diff
--- a/lib/fts.c Wed Apr 09 09:08:55 2014 -0700 +++ b/lib/fts.c Wed Apr 09 10:20:08 2014 -0600 @@ -79,6 +79,9 @@ #endif #include <dirent.h> +#ifndef _D_EXACT_NAMLEN +# define _D_EXACT_NAMLEN(dirent) strlen ((dirent)->d_name) +#endif #if HAVE_STRUCT_DIRENT_D_TYPE /* True if the type of the directory entry D is known. */