fix log(int) is ambiguous error on SunOS

This commit is contained in:
wiedi 2014-02-07 14:16:34 +00:00
parent d1ba63e083
commit 2ae5f46b77
3 changed files with 18 additions and 3 deletions

View file

@ -1,9 +1,9 @@
# $NetBSD: Makefile,v 1.6 2012/09/12 00:24:44 asau Exp $
# $NetBSD: Makefile,v 1.7 2014/02/07 14:16:34 wiedi Exp $
#
DISTNAME= sidplay-libs-2.1.1
PKGNAME= libsidplay2-2.1.1
PKGREVISION= 1
PKGREVISION= 2
CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=sidplay2/}

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.6 2012/02/05 09:00:13 sbd Exp $
$NetBSD: distinfo,v 1.7 2014/02/07 14:16:34 wiedi Exp $
SHA1 (sidplay-libs-2.1.1.tar.gz) = 8af6350866edc30b0d331e075fa97292f6f645a5
RMD160 (sidplay-libs-2.1.1.tar.gz) = 1ce4c3cb80470a834c5887b3f3be0b61ca71e4cd
@ -10,3 +10,4 @@ SHA1 (patch-builders_hardsid-builder_src_hardsid-builder.cpp) = cc3001b12d3f18d5
SHA1 (patch-builders_resid-builder_src_resid-builder.cpp) = 46d3686eb67256397458df1eac2c017465b616d8
SHA1 (patch-builders_resid-builder_src_resid.cpp) = db9f0bf3658c38e88eba7ced3f6102587558160d
SHA1 (patch-libsidplay_src_sidtune_SidTune.cpp) = 20f2a2f36db8c08989ad1239da15a91d82cd2a2f
SHA1 (patch-resid_sid.cc) = 88da243fab096f6b532af111c1d23ebc64ece632

View file

@ -0,0 +1,14 @@
$NetBSD: patch-resid_sid.cc,v 1.1 2014/02/07 14:16:34 wiedi Exp $
fix log(int) is ambiguous on SunOS
--- resid/sid.cc.orig 2004-06-14 20:08:23.000000000 +0000
+++ resid/sid.cc
@@ -552,7 +552,7 @@ bool SID::set_sampling_parameters(double
// sample_offset a whole multiple of the filter table resolution.
int res = method == SAMPLE_RESAMPLE_INTERPOLATE ?
FIR_RES_INTERPOLATE : FIR_RES_FAST;
- int n = (int)ceil(log(res/f_cycles_per_sample)/log(2));
+ int n = (int)ceil(log((double)res/f_cycles_per_sample)/log((double)2));
fir_RES = 1 << n;
// Allocate memory for FIR tables.