Ticket #2516 (new defect) — at Initial Version

Opened 11 years ago

Last modified 11 years ago

mc fails to build on DragonFlyBSD

Reported by: cheusov Owned by:
Priority: critical Milestone: 4.8.0-pre1
Component: mc-vfs Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: Votes for changeset:


mc fails to build on DragonFlyBSD with the following error message.

vfs.c: In function 'mc_readdir':
vfs.c:802: error: 'MAXNAMLEN' undeclared (first use in this function)
vfs.c:802: error: (Each undeclared identifier is reported only once
vfs.c:802: error: for each function it appears in.)
* Error code 1

This is because DragonFly? doesn't provide MAXNAMLEN macros in its header files. Their dirent structure is define like the following.

struct dirent {

#if defined(_KERNEL)

ino_t d_ino; /* file number of entry */


ino_t d_fileno; /* file number of entry */


uint16_t d_namlen; /* strlen(d_name) */
uint8_t d_type; /* file type, see blow */
uint8_t d_unused1; /* padding, reserved */
uint32_t d_unused2; /* reserved */
char d_name[255 + 1];

/* name, NUL-terminated */


Attached patch solves the problem.

Change History

Changed 11 years ago by cheusov

Note: See TracTickets for help on using tickets.