Fix build with GCC on FreeBSD Include <limits.h> for visibility of "PATH_MAX". Add FreeBSD to known platforms in "gen.py". Change-Id: Ied0608962b9d044fe4d2f08c4dbd0dea5158ba26 Reviewed-on: https://gn-review.googlesource.com/c/gn/+/5181 Reviewed-by: Nico Weber <thakis@chromium.org> Commit-Queue: Nico Weber <thakis@chromium.org>
diff --git a/build/gen.py b/build/gen.py index 22b6a64..a1e5201 100755 --- a/build/gen.py +++ b/build/gen.py
@@ -46,7 +46,7 @@ @staticmethod def known_platforms(): - return ['linux', 'darwin', 'msvc', 'aix', 'fuchsia', 'openbsd'] + return ['linux', 'darwin', 'msvc', 'aix', 'fuchsia', 'freebsd', 'openbsd'] def platform(self): return self._platform
diff --git a/util/exe_path.cc b/util/exe_path.cc index 2f80d5a..3c9c9de 100644 --- a/util/exe_path.cc +++ b/util/exe_path.cc
@@ -14,6 +14,7 @@ #elif defined(OS_WIN) #include <windows.h> #elif defined(OS_FREEBSD) +#include <limits.h> #include <sys/sysctl.h> #include <sys/types.h> #endif