mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-20 18:29:19 +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 NLENGTH(dirent) (strlen ((dirent)->d_name))
|
||||||
#define DIRENT_LENGTH_COMPUTED 1
|
#define DIRENT_LENGTH_COMPUTED 1
|
||||||
|
|
||||||
|
/* DragonFlyBSD doesn't provide MAXNAMLEN macro */
|
||||||
#ifndef MAXNAMLEN
|
#ifndef MAXNAMLEN
|
||||||
#define MC_MAXFILENAMELEN 256
|
#define MAXNAMLEN NAME_MAX
|
||||||
#else
|
|
||||||
#define MC_MAXFILENAMELEN MAXNAMLEN
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define MC_MAXFILENAMELEN MAXNAMLEN
|
||||||
|
|
||||||
/*** enums ***************************************************************************************/
|
/*** enums ***************************************************************************************/
|
||||||
|
|
||||||
/*** structures declarations (and typedefs of structures)*****************************************/
|
/*** structures declarations (and typedefs of structures)*****************************************/
|
||||||
|
Loading…
Reference in New Issue
Block a user