mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 18:14:25 +03:00
Ticket #2516: Fix build failure on DragonFly BSD
DragonFly BSD doesn't provide MAXNAMLEN macro to define size of d_name member of dirent structure. NAME_MAX is used if MAXNAMLEN is not provided by OS. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
12eb8b62c4
commit
32bffa8890
7
lib/fs.h
7
lib/fs.h
@ -67,12 +67,13 @@
|
||||
#define NLENGTH(dirent) (strlen ((dirent)->d_name))
|
||||
#define DIRENT_LENGTH_COMPUTED 1
|
||||
|
||||
/* DragonFlyBSD doesn't provide MAXNAMLEN macro */
|
||||
#ifndef MAXNAMLEN
|
||||
#define MC_MAXFILENAMELEN 256
|
||||
#else
|
||||
#define MC_MAXFILENAMELEN MAXNAMLEN
|
||||
#define MAXNAMLEN NAME_MAX
|
||||
#endif
|
||||
|
||||
#define MC_MAXFILENAMELEN MAXNAMLEN
|
||||
|
||||
/*** enums ***************************************************************************************/
|
||||
|
||||
/*** structures declarations (and typedefs of structures)*****************************************/
|
||||
|
Loading…
Reference in New Issue
Block a user