[rrd-developers] Building rrdtool v1.3.8 on win32
Barrie0482
barrie0482 at gmail.com
Sat Jul 4 04:54:00 CEST 2009
Barrie0482 wrote:
>
>
> I received the following error when I tried to build rrdlib.
>
> 1>------ Build started: Project: rrdlib, Configuration: Debug Win32 ------
> 1>Compiling...
> 1>rrd_restore.c
> 1>..\src\rrd_restore.c(917) : error C2664: 'get_long_from_node' : cannot
> convert parameter 3 from 'time_t *' to 'long *'
> 1> Types pointed to are unrelated; conversion requires
> reinterpret_cast, C-style cast or function-style
> casthttp://oss.oetiker.ch/rrdtool/forum.en.html#nabble-td3169370%7Ca3169370
> 1>Build log was saved at
> "file://d:\projects\rrdtool\rrdtool-1.3.8\win32\Debug\BuildLog.htm"
> 1>rrdlib - 1 error(s), 0 warning(s)
> ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
> ==========
>
OK, I have found a fix for this error. I have added the patch file below.
--- D:\rrdtool\src\rrd_restore_orig.c
+++ D:\rrdtool\src\rrd_restore.c
@@ -48,6 +48,7 @@
#define ARRAY_LENGTH(a) (sizeof (a) / sizeof ((a)[0]))
static int opt_range_check = 0;
static int opt_force_overwrite = 0;
+long * timet2long;
/*
* Auxiliary functions
@@ -897,12 +898,11 @@
rrd->stat_head->version,
sizeof (rrd->stat_head->version));
else if (xmlStrcmp(child->name, (const xmlChar *) "step") == 0)
- status = get_ulong_from_node(doc, child,
- &rrd->stat_head->pdp_step);
- else if (xmlStrcmp(child->name, (const xmlChar *) "lastupdate") ==
0)
- status = get_long_from_node(doc, child,
- &rrd->live_head->last_up);
- else if (xmlStrcmp(child->name, (const xmlChar *) "ds") == 0)
+ status = get_ulong_from_node(doc, child,
&rrd->stat_head->pdp_step);
+ else if (xmlStrcmp(child->name, (const xmlChar *) "lastupdate") ==
0) {
+ timet2long = (long *) & rrd->live_head->last_up;
+ status = get_long_from_node(doc, child, timet2long);
+ } else if (xmlStrcmp(child->name, (const xmlChar *) "ds") == 0)
status = parse_tag_ds(doc, child, rrd);
else if (xmlStrcmp(child->name, (const xmlChar *) "rra") == 0)
status = parse_tag_rra(doc, child, rrd);
I'm not sure if this is the best way to fix the problem I had, but it
worked. I have been able to compile and run rrdtool v1.3.8 on Windows XP. I
am going to do some testing and try to compile the ruby gem on this build.
Cheers, Barrie
--
View this message in context: http://n2.nabble.com/Building-rrdtool-v1.3.8-on-win32-tp3169370p3204387.html
Sent from the RRDtool Developers Mailinglist mailing list archive at Nabble.com.
More information about the rrd-developers
mailing list