diff --git a/src/rusage.c b/src/rusage.c
index 225279a0460b25ba88a572316db52a16eb2c98c3..c50771e76ba2b6682fc0f550595dbb9cf127562a 100644
--- a/src/rusage.c
+++ b/src/rusage.c
@@ -14,6 +14,10 @@
 #include "types.h"
 #include "rusage.h"
 
+#ifdef HAVE_SYS_TIMES_H
+#include <sys/times.h>
+#endif
+
 static INT32 rusage_values[30];
 /*
  * Here comes a long blob with stuff to see how to find out about