index 221dcd71f31723f71b23de27ca479bf2e602e91c..21d81d8d1686b7061f0ae391d0deb71aae5d5996 100644 (file)
--- a/program/src/rrd_format.c
+++ b/program/src/rrd_format.c
return sizeof(stat_head_t) + \
sizeof(ds_def_t) * rrd->stat_head->ds_cnt + \
sizeof(rra_def_t) * rrd->stat_head->rra_cnt + \
- sizeof(time_t) + \
- sizeof(live_head_t) + \
+ ( atoi(rrd->stat_head->version) < 3 ? sizeof(time_t) : sizeof(live_head_t) ) + \
sizeof(pdp_prep_t) * rrd->stat_head->ds_cnt + \
sizeof(cdp_prep_t) * rrd->stat_head->ds_cnt * rrd->stat_head->rra_cnt + \
sizeof(rra_ptr_t) * rrd->stat_head->rra_cnt;