]> git.ipfire.org Git - thirdparty/collectd.git/commit
Fix glibc feature macro handling for timegm
authorFlorian Weimer <fweimer@redhat.com>
Thu, 6 Apr 2023 17:00:08 +0000 (19:00 +0200)
committerMatthias Runge <mrunge@matthias-runge.de>
Sun, 23 Apr 2023 09:57:22 +0000 (11:57 +0200)
commit93fbc158d09b85b98333f08ab16ce2c79f8271c4
treebfe6da17da6fe7966170f6aa5eb0690cc845d7d9
parent45ffc78d3139e11b1b04704daafe37f9dbc881bd
Fix glibc feature macro handling for timegm

The way strptime is activated using feature macros, _DEFAULT_SOURCE
(successor to _BSD_SOURCE) is disabled implicitly, so timegm is
hidden.  Defining _DEFAULT_SOURCE at the same time as the other
feature macros solves this, and removes the need for the
TIMEGM_NEEDS_BSD configure macro.

This avoids an implicit declaration of timegm in src/bind.c, and build
failures with future compilers.
configure.ac
src/bind.c