From cafd77993ec5e16634b774b65bf6da9b34a21fc5 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Wed, 31 Aug 2022 11:24:19 +0200 Subject: [PATCH] clients/upsclient.h: ensure time_t is defined [Retrieved from: https://github.com/networkupstools/nut/commit/cafd77993ec5e16634b774b65bf6da9b34a21fc5] Signed-off-by: Fabrice Fontaine --- clients/upsclient.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/clients/upsclient.h b/clients/upsclient.h index 08574b8f8b..e346d8f519 100644 --- a/clients/upsclient.h +++ b/clients/upsclient.h @@ -41,6 +41,18 @@ #include #endif +/* Not including NUT timehead.h because this is part of end-user API */ +#ifdef TIME_WITH_SYS_TIME +# include +# include +#else +# ifdef HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif + #ifdef __cplusplus /* *INDENT-OFF* */ extern "C" {