From 1c4dd10d70ba9ed6dead6cc56cd0f572627cf619 Mon Sep 17 00:00:00 2001 From: Karl DeBisschop Date: Fri, 8 Nov 2002 07:20:05 +0000 Subject: patches required to build on solaris with asprintf and gettimeofday git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@174 f882894a-f735-0410-b71e-b25c423dba1c --- plugins/utils.h.in | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'plugins/utils.h.in') diff --git a/plugins/utils.h.in b/plugins/utils.h.in index d88d0cb0..2b668f3c 100644 --- a/plugins/utils.h.in +++ b/plugins/utils.h.in @@ -46,16 +46,15 @@ int is_percentage (char *); int is_option (char *); /* generalized timer that will do milliseconds if available */ -#ifndef HAVE_GETTIMEOFDAY +#ifndef HAVE_STRUCT_TIMEVAL struct timeval { long tv_sec; /* seconds */ long tv_usec; /* microseconds */ }; +#endif -#define gettimeofday (tvp,tz) {\ - tvp->tv_usec=0;\ - tvp->tv_sec=(long)time();\ -} +#ifndef HAVE_GETTIMEOFDAY +int gettimeofday(struct timeval *tv, struct timezone *tz); #endif double delta_time (struct timeval tv); -- cgit v1.2.3-74-g34f1