diff --git a/src/rusage.c b/src/rusage.c
index 5689aff45c75fc62c62907c9dc757be111b6c705..03cea1659a59eb7ac1379f6222b89948b67bf594 100644
--- a/src/rusage.c
+++ b/src/rusage.c
@@ -19,6 +19,9 @@
 #ifdef HAVE_SYS_RESOURCE_H
 #include <sys/resource.h>
 #endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 
 static INT32 rusage_values[30];
 /*