diff --git a/tools/perf/bench/numa.c b/tools/perf/bench/numa.c
index 98ad783efc69dd1c3d3cae65704ce7bd0181fe37..a7784554a80deba55f91753598f8a10796f8d6f4 100644
--- a/tools/perf/bench/numa.c
+++ b/tools/perf/bench/numa.c
@@ -39,6 +39,10 @@
 #include <numa.h>
 #include <numaif.h>
 
+#ifndef RUSAGE_THREAD
+# define RUSAGE_THREAD 1
+#endif
+
 /*
  * Regular printout to the terminal, supressed if -q is specified:
  */