rrdtool: Keep time as 'long' despite 64bit time_t in musl
authorHannu Nyman <hannu.nyman@iki.fi>
Sat, 9 Oct 2021 07:15:24 +0000 (10:15 +0300)
committerHannu Nyman <hannu.nyman@iki.fi>
Sun, 10 Oct 2021 17:58:47 +0000 (20:58 +0300)
commite341af53dbc2f835b2a7899b86ee67014448ce41
tree58e2b3f20b87164923e0187fde6a63fc952877ad
parent468fc5fca429ca4276dfcfb4136a0d741ed9038b
rrdtool: Keep time as 'long' despite 64bit time_t in musl

Adjust to the 64 bit time_t in musl 1.2.2 by keeping time
internally in RRD still as 'long', so that old databases
created during musl 1.1.x still work in 32 bit targets.

That also helps with several interal functions that use 'long'
for calculations and printf formatting.

* Define internal type TIME_INT as 'long', and use that
  internally in calculations
* Use time_t vs. TIME_INT casting when necessary
* Provide time_t variable pointers for functions expecting
  a time_t pointer.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
utils/rrdtool1/Makefile
utils/rrdtool1/patches/100-new-long-rrd.patch [new file with mode: 0644]