summaryrefslogtreecommitdiffstats
path: root/BaseTools
diff options
context:
space:
mode:
Diffstat (limited to 'BaseTools')
-rw-r--r--BaseTools/Source/C/Common/CommonLib.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/BaseTools/Source/C/Common/CommonLib.h b/BaseTools/Source/C/Common/CommonLib.h
index e1cce985f7..0f05d88db2 100644
--- a/BaseTools/Source/C/Common/CommonLib.h
+++ b/BaseTools/Source/C/Common/CommonLib.h
@@ -12,9 +12,17 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include <Common/UefiBaseTypes.h>
#include <Common/BuildVersion.h>
#include <assert.h>
+#ifndef _WIN32
+#include <limits.h>
+#endif
+
#define PRINTED_GUID_BUFFER_SIZE 37 // including null-termination
+#ifdef PATH_MAX
+#define MAX_LONG_FILE_PATH PATH_MAX
+#else
#define MAX_LONG_FILE_PATH 500
+#endif
#define MAX_UINT64 ((UINT64)0xFFFFFFFFFFFFFFFFULL)
#define MAX_UINT32 ((UINT32)0xFFFFFFFF)