Bug 208905 - graphics/opencollada: Fix build with libc++ 3.8.0
Summary: graphics/opencollada: 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: Kurt Jaeger
Depends on:
Blocks: 208158
  Show dependency treegraph
Reported: 2016-04-18 19:33 UTC by Dimitry Andric
Modified: 2016-05-05 19:52 UTC (History)
1 user (show)

See Also:
pi: maintainer-feedback-

Use <cmath> instead of <math.h> to get std::isnan (1.06 KB, patch)
2016-04-18 19:33 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-18 19:33:43 UTC
Created attachment 169451 [details]
Use <cmath> instead of <math.h> to get std::isnan

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

/wrkdirs/usr/ports/graphics/opencollada/work/OpenCOLLADA-a59a438/GeneratedSaxParser/src/GeneratedSaxParserUtils.cpp:1559:16: error: no member named 'isnan' in namespace 'std'; did you mean simply 'isnan'?
        return std::isnan(value);

This is because opencollada's GeneratedSaxParserUtils.cpp includes <math.h>, not <cmath>.  The latter defines std::isnan(), so use it instead.

[1] http://package18.nyi.freebsd.org/data/headamd64PR208158-default/2016-03-22_18h30m05s/logs/errors/opencollada-
Comment 1 Kurt Jaeger freebsd_committer 2016-04-30 04:28:44 UTC
testbuilds are fine.
Comment 2 commit-hook freebsd_committer 2016-05-05 19:52:05 UTC
A commit references this bug:

Author: pi
Date: Thu May  5 19:52:01 UTC 2016
New revision: 414660
URL: https://svnweb.freebsd.org/changeset/ports/414660

  graphics/opencollada: Fix build with libc++ 3.8.0

  PR:		208905
  Submitted by:	dim
  Approved by:	mva (maintainer timeout)

Comment 3 Kurt Jaeger freebsd_committer 2016-05-05 19:52:19 UTC
Committed, thanks!