diff --git a/lib/fs.h b/lib/fs.h index c3200dc7a..11111c926 100644 --- a/lib/fs.h +++ b/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)*****************************************/