Bug 208489

Summary: audio/milkytracker: Fix build with libc++ 3.8.0
Product: Ports & Packages Reporter: Dimitry Andric <dim>
Component: Individual Port(s)Assignee: Emanuel Haupt <ehaupt>
Status: Closed FIXED    
Severity: Affects Some People Flags: bugzilla: maintainer-feedback? (ehaupt)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 208158    
Description Flags
Fix type for abs() calls in audio/milkytracker none

Description Dimitry Andric freebsd_committer 2016-04-03 19:18:59 UTC
Created attachment 168939 [details]
Fix type for abs() calls in audio/milkytracker

During the exp-run in bug 208158, it was found that audio/milkytracker gives errors with libc++ 3.8.0 [1]:

TrackerStartUp.cpp:129:12: error: call to 'abs' is ambiguous
                deltaT = abs(::PPGetTickCount() - startTime);

This is because PPGetTickCount() returns an unsigned value, and it is therefore ambiguous to which type the expression should be casted before calling abs().  A similar ambiguity exists further down in the cpp file.  Fix these by explicity casting the PPGetTickCount() return value to a signed type.

[1] http://package18.nyi.freebsd.org/data/headamd64PR208158-default/2016-03-22_18h30m05s/logs/errors/milkytracker-0.90.86_3.log
Comment 1 Emanuel Haupt freebsd_committer 2016-04-04 13:40:12 UTC
Committed, thanks!
Comment 2 commit-hook freebsd_committer 2016-04-04 13:40:48 UTC
A commit references this bug:

Author: ehaupt
Date: Mon Apr  4 13:39:55 UTC 2016
New revision: 412512
URL: https://svnweb.freebsd.org/changeset/ports/412512

  Fix build with libc++ 3.8.0

  PR:		208489
  Submitted by:	dim