Opened 10 years ago
#123 new defect
Use strlen(d.d_name) instead of d_namlen
Reported by: | Callum Davies | 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)
Note:
See TracTickets
for help on using tickets.