-#ifdef hpux_HOST_OS
-#include <sys/syscall.h>
-#define getrusage(a, b) syscall(SYS_GETRUSAGE, a, b)
-#define HAVE_GETRUSAGE
+#if !HAVE_GETRUSAGE && HAVE_SYS_SYSCALL_H
+# include <sys/syscall.h>
+# if defined(SYS_GETRUSAGE) /* hpux_HOST_OS */
+# define getrusage(a, b) syscall(SYS_GETRUSAGE, a, b)
+# define HAVE_GETRUSAGE 1
+# endif