Skip to content

Commit

Permalink
main: add d_reclen as an alias for d_namelen (struct dirent)
Browse files Browse the repository at this point in the history
Though protable-dirent.h defineds d_namelen as a field of
struct dirent, protable-scan.c expects it as d_reclen.

man page of getdents in GNU/Linux calls it d_reclen.
This commit follows the naming in the man page.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
  • Loading branch information
masatake committed Aug 4, 2017
1 parent dbde971 commit 70caa13
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions main/portable-dirent.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ extern "C" {
typedef struct dirent
{
char d_name[MAX_PATH + 1]; /* File name */
#define d_reclen d_namelen
size_t d_namlen; /* Length of name without \0 */
int d_type; /* File type */
} dirent;
Expand Down

0 comments on commit 70caa13

Please sign in to comment.