]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
build: Include limits.h for PATH_MAX
authorJoel Rosdahl <joel@rosdahl.net>
Wed, 26 Oct 2022 19:00:31 +0000 (21:00 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Wed, 26 Oct 2022 19:41:16 +0000 (21:41 +0200)
Note: The C++ climits header does not guarantee to define PATH_MAX.

Fixes #1193.

src/MiniTrace.cpp
src/Util.cpp

index 90ffcc4bdf84db5fcab83d2a6a845be58b33de96..cd9f4f80989bc88a2d9a8619bf6b469141f93d70 100644 (file)
@@ -26,6 +26,8 @@
 #include <core/wincompat.hpp>
 #include <util/TimePoint.hpp>
 
+#include <limits.h> // NOLINT: PATH_MAX is defined in limits.h
+
 #ifdef HAVE_UNISTD_H
 #  include <unistd.h>
 #endif
index 5dde0017c18ab6c50e385dd1fdd09beb01a15e25..bdcc9117df2a60818c422afb35c8ae64ccffa1cf 100644 (file)
@@ -35,6 +35,8 @@
 #include <util/path.hpp>
 #include <util/string.hpp>
 
+#include <limits.h> // NOLINT: PATH_MAX is defined in limits.h
+
 extern "C" {
 #include "third_party/base32hex.h"
 }