Opened 4 years ago

#123 new defect

Use strlen(d.d_name) instead of d_namlen

Reported by: calrogman Owned by:
Priority: minor Milestone:
Component: kmk Version: 0.1.5
Keywords: Cc:

Description

In src/kmk/kmkbuiltin/fts.c, use strlen(d.d_name) instead of d_namlen

d_namlen is a non-standard member of struct dirent, used primarily on *BSD. It has the same value as strlen(dirent.d_name), which is available everywhere, so we might as well use that.

One of the ifdefs removed in this patch prevents fts.c from compiling on Linux systems that aren't using glibc.

Attachments (1)

d_namlen.patch (1022 bytes) - added by calrogman 4 years ago.

Download all attachments as: .zip

Change History (1)

Changed 4 years ago by calrogman

Note: See TracTickets for help on using tickets.