diff options
| author | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2002-11-08 07:20:05 +0000 |
|---|---|---|
| committer | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2002-11-08 07:20:05 +0000 |
| commit | 1c4dd10d70ba9ed6dead6cc56cd0f572627cf619 (patch) | |
| tree | 62485f23a5478eb8a6ad6b2de1eac322bf195662 /plugins/utils.h.in | |
| parent | 34ba941736b434a6c1453feec35d04ed7b0a59e5 (diff) | |
| download | monitoring-plugins-1c4dd10d70ba9ed6dead6cc56cd0f572627cf619.tar.gz | |
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
Diffstat (limited to 'plugins/utils.h.in')
| -rw-r--r-- | plugins/utils.h.in | 9 |
1 files changed, 4 insertions, 5 deletions
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 *); | |||
| 46 | int is_option (char *); | 46 | int is_option (char *); |
| 47 | 47 | ||
| 48 | /* generalized timer that will do milliseconds if available */ | 48 | /* generalized timer that will do milliseconds if available */ |
| 49 | #ifndef HAVE_GETTIMEOFDAY | 49 | #ifndef HAVE_STRUCT_TIMEVAL |
| 50 | struct timeval { | 50 | struct timeval { |
| 51 | long tv_sec; /* seconds */ | 51 | long tv_sec; /* seconds */ |
| 52 | long tv_usec; /* microseconds */ | 52 | long tv_usec; /* microseconds */ |
| 53 | }; | 53 | }; |
| 54 | #endif | ||
| 54 | 55 | ||
| 55 | #define gettimeofday (tvp,tz) {\ | 56 | #ifndef HAVE_GETTIMEOFDAY |
| 56 | tvp->tv_usec=0;\ | 57 | int gettimeofday(struct timeval *tv, struct timezone *tz); |
| 57 | tvp->tv_sec=(long)time();\ | ||
| 58 | } | ||
| 59 | #endif | 58 | #endif |
| 60 | 59 | ||
| 61 | double delta_time (struct timeval tv); | 60 | double delta_time (struct timeval tv); |
