]> Kevux Git Server - fll/commitdiff
Update: Fall back to MAXNAMLEN if NAME_MAX is not available.
authorKevin Day <thekevinday@gmail.com>
Wed, 8 Nov 2023 02:32:34 +0000 (20:32 -0600)
committerKevin Day <thekevinday@gmail.com>
Wed, 8 Nov 2023 02:32:34 +0000 (20:32 -0600)
On systems like BSD, MAXNAMLEN is available in place of NAME_MAX.

level_0/f_directory/c/directory/common.h

index 39ddce7f3842819f4a9eae31cfc03668ac1a63b7..2fc61982079f556a241c6073d1d373dd6581b306 100644 (file)
@@ -97,6 +97,8 @@ extern "C" {
 
   #ifdef NAME_MAX
     #define F_directory_max_name_d NAME_MAX
+  #elif MAXNAMLEN
+    #define F_directory_max_name_d MAXNAMLEN
   #else
     #define F_directory_max_name_d 255
   #endif // NAME_MAX