Ticket #2516 (new defect) — at Version 1

Opened 14 years ago

Last modified 14 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:

Description (last modified by angel_il) (diff)

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)
!defined(BSD_VISIBLE)

ino_t d_ino; /* file number of entry */

#else

ino_t d_fileno; /* file number of entry */

#endif

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 14 years ago by cheusov

comment:1 Changed 14 years ago by angel_il

  • Description modified (diff)
Note: See TracTickets for help on using tickets.