[packages] rrdtool, rrdtool-1.0.x: backport upstream commit r2069

Explicitely cast float cookie value to double, fixes erroneous
"RRD was created on another architecture" errors on x86.
Patches provided by Thomas Heil <heil@terminal-consulting.de>

git-svn-id: svn://svn.openwrt.org/openwrt/packages@29874 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
jow 2012-01-23 13:55:11 +00:00
parent 92c8129c46
commit d45ef2c11a
4 changed files with 30 additions and 4 deletions

View File

@ -1,5 +1,5 @@
#
# Copyright (C) 2006-2010 OpenWrt.org
# Copyright (C) 2006-2012 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=rrdtool1
PKG_VERSION:=1.0.50
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_BUILD_DIR:=$(BUILD_DIR)/rrdtool-$(PKG_VERSION)
PKG_SOURCE:=rrdtool-$(PKG_VERSION).tar.gz

View File

@ -0,0 +1,13 @@
Index: rrdtool-1.0.50/src/rrd_format.h
===================================================================
--- rrdtool-1.0.50.orig/src/rrd_format.h
+++ rrdtool-1.0.50/src/rrd_format.h
@@ -20,7 +20,7 @@
#define RRD_COOKIE "RRD"
#define RRD_VERSION "0001"
-#define FLOAT_COOKIE 8.642135E130
+#define FLOAT_COOKIE ((double)8.642135E130)
#if defined(WIN32)
#define DNAN ((double)fmod(0.0,0.0))

View File

@ -1,5 +1,5 @@
#
# Copyright (C) 2007-2009 OpenWrt.org
# Copyright (C) 2007-2012 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=rrdtool
PKG_VERSION:=1.2.30
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE_URL:=http://oss.oetiker.ch/rrdtool/pub/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz

View File

@ -0,0 +1,13 @@
Index: rrdtool-1.2.30/src/rrd_format.h
===================================================================
--- rrdtool-1.2.30.orig/src/rrd_format.h
+++ rrdtool-1.2.30/src/rrd_format.h
@@ -22,7 +22,7 @@
/* #define RRD_VERSION "0002" */
/* changed because microsecond precision requires another field */
#define RRD_VERSION "0003"
-#define FLOAT_COOKIE 8.642135E130
+#define FLOAT_COOKIE ((double)8.642135E130)
#include "rrd_nan_inf.h"