Closed Bug 995543 Opened 6 years ago Closed 6 years ago

content/media/MediaStreamGraph.cpp:904:11: error: call to 'abs' is ambiguous (clang++ -stdlib=libc++)

Categories

(Core :: Audio/Video, defect)

x86_64
FreeBSD
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla31

People

(Reporter: jbeich, Assigned: jbeich)

References

Details

Attachments

(1 file)

Attached patch fixSplinter Review
In file included from content/media/Unified_cpp_content_media1.cpp:67:
content/media/MediaStreamGraph.cpp:904:11: error:
      call to 'abs' is ambiguous
      if (std::abs(audioOutput.mLastTickWritten - offset) != 1) {
          ^~~~~~~~
/usr/include/c++/v1/cmath:660:1: note: candidate function
abs(float __x) _NOEXCEPT {return fabsf(__x);}
^
/usr/include/c++/v1/cmath:664:1: note: candidate function
abs(double __x) _NOEXCEPT {return fabs(__x);}
^
/usr/include/c++/v1/cmath:668:1: note: candidate function
abs(long double __x) _NOEXCEPT {return fabsl(__x);}
^
1 error generated.

http://buildbot.rhaalovely.net/builders/mozilla-central-freebsd-amd64/builds/289/steps/build/logs/stdio

It doesn't happen on Linux as gcc/libstdc++ bootlegs |long abs(long)| from <cstdlib> via <algorithm> (directly or indirectly).

/usr/local/lib/gcc48/include/c++/cstdlib
dist/system_wrappers/cstdlib:3:0,
dist/stl_wrappers/cstdlib:55,
/usr/local/lib/gcc48/include/c++/bits/stl_algo.h:59,
/usr/local/lib/gcc48/include/c++/algorithm:62,
dist/system_wrappers/algorithm:3,
dist/stl_wrappers/algorithm:55,
content/media/AudioSampleFormat.h:10,
content/media/AudioStream.h:9,
content/media/MediaStreamGraph.h:11,
content/media/MediaStreamGraphImpl.h:9,
content/media/MediaStreamGraph.cpp:6:
Attachment #8405717 - Flags: review?(paul)
Attachment #8405717 - Flags: review?(paul) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/d0874032eeba
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Blocks: 1141397
You need to log in before you can comment on or make changes to this bug.