Bug 208489 - audio/milkytracker: Fix build with libc++ 3.8.0
Summary: audio/milkytracker: Fix build with libc++ 3.8.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Emanuel Haupt
URL:
Keywords:
Depends on:
Blocks: 208158
  Show dependency treegraph
 
Reported: 2016-04-03 19:18 UTC by Dimitry Andric
Modified: 2016-04-04 13:40 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (ehaupt)


Attachments
Fix type for abs() calls in audio/milkytracker (1.58 KB, patch)
2016-04-03 19:18 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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

Log:
  Fix build with libc++ 3.8.0

  PR:		208489
  Submitted by:	dim

Changes:
  head/audio/milkytracker/files/
  head/audio/milkytracker/files/patch-src__tracker__TrackerStartUp.cpp