From: https://github.com/void-linux/void-packages/tree/7bfdb7ab051fbb43309c764ed4613d39ee590679/srcpkgs/lshw/patches/

Need to include limits.h for the definition of PATH_MAX.

--- a/src/core/cpufreq.cc
+++ b/src/core/cpufreq.cc
@@ -10,6 +10,7 @@
 #include "version.h"
 #include "hw.h"
 #include "osutils.h"
+#include <limits.h>
 #include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
