bind plugin: Use timegm() to convert to time_t if available.
authorFlorian Forster <octo@collectd.org>
Sun, 7 May 2017 18:34:09 +0000 (20:34 +0200)
committerFlorian Forster <octo@collectd.org>
Mon, 8 May 2017 08:43:53 +0000 (10:43 +0200)
commitc3e2a69bd600fa4c4a9d4603094f39ea81c11116
tree324a3b0b8d0dbc263bc5ed135a1ea3fffe4c8541
parent938d6380a94cd898a28c5ad1a37c19e7bd47db4c
bind plugin: Use timegm() to convert to time_t if available.

FreeBSD doesn't provide the "extern long timezone", presumably because
it's "only" an XSI extension, leading to a portability issue with the
previous approach.

timegm() is a non-standard function available in GNU's and BSD's libc
which is doing exactly what we need. The previous code is left as a
fallback.

Fixes: #1268
configure.ac
src/bind.c