/*
- * $Id: squid.h,v 1.143 1997/12/05 22:01:15 wessels Exp $
+ * $Id: squid.h,v 1.144 1997/12/06 01:26:28 wessels Exp $
*
* AUTHOR: Duane Wessels
*
#define MAXPATHLEN SQUID_MAXPATHLEN
#endif
-#if !defined(HAVE_GETRUSAGE) && defined(_SQUID_HPUX_)
+#if !HAVE_GETRUSAGE
+#if defined(_SQUID_HPUX_)
#define HAVE_GETRUSAGE 1
#define getrusage(a, b) syscall(SYS_GETRUSAGE, a, b)
+#else
+/*
+ * If we don't have getrusage() then we create a fake structure
+ * with only the fields Squid cares about. This just makes the
+ * source code cleaner, so we don't need lots of #ifdefs in other
+ * places
+ */
+typedef void struct {
+ struct timeval ru_stime;
+ int ru_maxrss;
+ int ru_majflt;
+} rusage;
+#endif
#endif
#if !defined(HAVE_GETPAGESIZE) && defined(_SQUID_HPUX_)