summaryrefslogtreecommitdiff
path: root/databases/rrdtool
diff options
context:
space:
mode:
authorspz <spz>2010-03-13 16:41:21 +0000
committerspz <spz>2010-03-13 16:41:21 +0000
commita49bfa1e2bee67caaa963a9eafe5e91a63a44fd0 (patch)
treef43a4d70be125dcba586f0342455970c750f256d /databases/rrdtool
parente9ef8986be0f12be5b43174327cdcd6ba23c0ef5 (diff)
downloadpkgsrc-a49bfa1e2bee67caaa963a9eafe5e91a63a44fd0.tar.gz
make "rrdtool restore" work on archs where time_t is an int
Diffstat (limited to 'databases/rrdtool')
-rw-r--r--databases/rrdtool/Makefile3
-rw-r--r--databases/rrdtool/distinfo3
-rw-r--r--databases/rrdtool/patches/patch-az29
3 files changed, 33 insertions, 2 deletions
diff --git a/databases/rrdtool/Makefile b/databases/rrdtool/Makefile
index 801f71122fe..3f3e6a55ce2 100644
--- a/databases/rrdtool/Makefile
+++ b/databases/rrdtool/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.80 2010/03/05 08:00:35 martti Exp $
+# $NetBSD: Makefile,v 1.81 2010/03/13 16:41:21 spz Exp $
DISTNAME= rrdtool-1.3.9
+PKGREVISION= 1
CATEGORIES= databases graphics net
MASTER_SITES= http://oss.oetiker.ch/rrdtool/pub/
diff --git a/databases/rrdtool/distinfo b/databases/rrdtool/distinfo
index 24536597e34..3f5f3247b75 100644
--- a/databases/rrdtool/distinfo
+++ b/databases/rrdtool/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.39 2009/10/29 12:43:49 martti Exp $
+$NetBSD: distinfo,v 1.40 2010/03/13 16:41:21 spz Exp $
SHA1 (rrdtool-1.3.9.tar.gz) = 5c202810bdf5e5dda3f06079c7739993622c7e86
RMD160 (rrdtool-1.3.9.tar.gz) = 2b05c37a713cca3d15d92d1d9c5292c3cc4e0781
Size (rrdtool-1.3.9.tar.gz) = 1189442 bytes
SHA1 (patch-al) = 5ff520a236abe66ee7daf8ac56274da52dd42172
+SHA1 (patch-az) = e6d55613b6041546223e89763633e7fa81bc029f
diff --git a/databases/rrdtool/patches/patch-az b/databases/rrdtool/patches/patch-az
new file mode 100644
index 00000000000..276f7268db0
--- /dev/null
+++ b/databases/rrdtool/patches/patch-az
@@ -0,0 +1,29 @@
+$NetBSD: patch-az,v 1.1 2010/03/13 16:41:21 spz Exp $
+
+--- src/rrd_restore.c.orig 2009-10-24 10:46:42.000000000 +0000
++++ src/rrd_restore.c
+@@ -966,10 +966,20 @@ static int parse_tag_rrd(
+ else { if (sizeof(time_t) == sizeof(long long)) {
+ status = get_llong_from_node(doc, child, (long long *)&rrd->live_head->last_up);
+ }
+- else {
+- rrd_set_error("can't convert to time_t ...", child->name);
+- status = -1;
+- }
++ else if (sizeof(time_t) == sizeof(int)) {
++ long temp_last_up;
++ status = get_long_from_node(doc, child, &temp_last_up);
++ if (temp_last_up < INT_MAX)
++ rrd->live_head->last_up = temp_last_up;
++ else {
++ rrd_set_error("can't convert to time_t ...", child->name);
++ status = -1;
++ }
++ }
++ else {
++ rrd_set_error("can't convert to time_t ...", child->name);
++ status = -1;
++ }
+ }
+ }
+ else if (xmlStrcmp(child->name, (const xmlChar *) "ds") == 0)