--- a/tools/include/uapi/linux/perf_event.h
+++ b/tools/include/uapi/linux/perf_event.h
@@ -14,6 +14,7 @@
 #ifndef _UAPI_LINUX_PERF_EVENT_H
 #define _UAPI_LINUX_PERF_EVENT_H
 
+#include <linux/compiler.h>
 #include <linux/types.h>
 #include <linux/ioctl.h>
 #include <asm/byteorder.h>
--- a/tools/power/x86/turbostat/turbostat.c
+++ b/tools/power/x86/turbostat/turbostat.c
@@ -43,7 +43,8 @@
 #include <cpuid.h>
 #include <linux/capability.h>
 #include <errno.h>
 #include <math.h>
+#include <limits.h>
 
 char *proc_stat = "/proc/stat";
 FILE *outf;
--- a/tools/thermal/tmon/tmon.h
+++ b/tools/thermal/tmon/tmon.h
@@ -19,6 +19,9 @@
 #ifndef TMON_H
 #define TMON_H
 
+#include <pthread.h>
+#include <sys/time.h>
+
 #define MAX_DISP_TEMP 125
 #define MAX_CTRL_TEMP 105
 #define MIN_CTRL_TEMP 40
