diff options
author | Eneas U de Queiroz <cotequeiroz@gmail.com> | 2022-09-15 11:53:23 -0300 |
---|---|---|
committer | Rosen Penev <rosenp@gmail.com> | 2022-09-17 12:54:11 -0700 |
commit | fbcedc003e8e1d7602acdd91ee744076a091cc90 (patch) | |
tree | e8418c2cc323e2e87f8ced419a7f849cff3d6d67 /net | |
parent | 1d3e666fbe5724540407ec4ef3e609990ced8631 (diff) |
nut: ensure time_t is defined in upsclient.h
Use an upstream commit to ensure time_t is defined in upsclient.h,
fixing a compile failure in collectd.
Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/nut/patches/001-clients-upsclient.h-ensure-time_t-is-defined.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/net/nut/patches/001-clients-upsclient.h-ensure-time_t-is-defined.patch b/net/nut/patches/001-clients-upsclient.h-ensure-time_t-is-defined.patch new file mode 100644 index 000000000..bdc199006 --- /dev/null +++ b/net/nut/patches/001-clients-upsclient.h-ensure-time_t-is-defined.patch @@ -0,0 +1,27 @@ +From cafd77993ec5e16634b774b65bf6da9b34a21fc5 Mon Sep 17 00:00:00 2001 +From: Jim Klimov <jimklimov+nut@gmail.com> +Date: Wed, 31 Aug 2022 11:24:19 +0200 +Subject: [PATCH] clients/upsclient.h: ensure time_t is defined + + +--- a/clients/upsclient.h ++++ b/clients/upsclient.h +@@ -41,6 +41,18 @@ + #include <limits.h> + #endif + ++/* Not including NUT timehead.h because this is part of end-user API */ ++#ifdef TIME_WITH_SYS_TIME ++# include <sys/time.h> ++# include <time.h> ++#else ++# ifdef HAVE_SYS_TIME_H ++# include <sys/time.h> ++# else ++# include <time.h> ++# endif ++#endif ++ + #ifdef __cplusplus + /* *INDENT-OFF* */ + extern "C" { |