From: Tobias Oetiker Date: Mon, 11 Jan 2010 09:06:59 +0000 (+0000) Subject: we are using a comparison with sizeof(long) to figure the size of time_t this is... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=147dd882294ef7dfa9a586d9c4b57e62bf08f290;p=thirdparty%2Frrdtool-1.x.git we are using a comparison with sizeof(long) to figure the size of time_t this is unfortunate since on freebsd in 64bit mode time_t is 32 bit while long is 64 bit git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.3/program@1997 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/src/rrd_restore.c b/src/rrd_restore.c index 9f8c4544..cefdfaea 100644 --- a/src/rrd_restore.c +++ b/src/rrd_restore.c @@ -960,7 +960,7 @@ static int parse_tag_rrd( status = get_ulong_from_node(doc, child, &rrd->stat_head->pdp_step); else if (xmlStrcmp(child->name, (const xmlChar *) "lastupdate") == 0) { - if (sizeof(time_t) == sizeof(long)) { + if (sizeof(time_t) == sizeof(int)) { status = get_long_from_node(doc, child, (long *)&rrd->live_head->last_up); } else { if (sizeof(time_t) == sizeof(long long)) {