Opened 9 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)

d_namlen.patch (1022 bytes) - added by Callum Davies 9 years ago.

Download all attachments as: .zip

Change History (1)

Changed 9 years ago by Callum Davies

Attachment: d_namlen.patch added
Note: See TracTickets for help on using tickets.