summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorriggs <riggs@FreeBSD.org>2016-07-18 21:13:06 +0000
committerriggs <riggs@FreeBSD.org>2016-07-18 21:13:06 +0000
commite1517d24ffe17e5f86b94ee0fbeaa8e3d2d5f88a (patch)
tree1dc7c5d9ea28441b01434bc2ab7419beed67d54c
parent066c49cfc9cbfd0fedf06543ac9238c349b0991b (diff)
downloadFreeBSD-ports-e1517d24ffe17e5f86b94ee0fbeaa8e3d2d5f88a.zip
FreeBSD-ports-e1517d24ffe17e5f86b94ee0fbeaa8e3d2d5f88a.tar.gz
MFH: r418702
Fix build with libc++ 3.8.0 Approved by: ports-secteam (build fix blanket)
-rw-r--r--multimedia/mpeg4ip/files/patch-server_mp4live_audio__oss__source.cpp20
-rw-r--r--multimedia/mpeg4ip/files/patch-server_mp4live_audio__oss__source.h11
2 files changed, 31 insertions, 0 deletions
diff --git a/multimedia/mpeg4ip/files/patch-server_mp4live_audio__oss__source.cpp b/multimedia/mpeg4ip/files/patch-server_mp4live_audio__oss__source.cpp
new file mode 100644
index 0000000..320f9fd
--- /dev/null
+++ b/multimedia/mpeg4ip/files/patch-server_mp4live_audio__oss__source.cpp
@@ -0,0 +1,20 @@
+--- server/mp4live/audio_oss_source.cpp.orig 2005-09-07 22:28:01 UTC
++++ server/mp4live/audio_oss_source.cpp
+@@ -265,7 +265,7 @@ bool COSSAudioSource::InitDevice(void)
+
+ rc = ioctl(m_audioDevice, SNDCTL_DSP_SPEED, &samplingRate);
+
+- if (rc < 0 || abs(samplingRate - targetSamplingRate) > 1) {
++ if (rc < 0 || abs((int)(samplingRate - targetSamplingRate) > 1)) {
+ error_message("Couldn't set sampling rate for %s", deviceName);
+ close(m_audioDevice);
+ return false;
+@@ -450,7 +450,7 @@ bool CAudioCapabilities::ProbeDevice()
+ rc = ioctl(audioDevice, SNDCTL_DSP_SPEED, &samplingRate);
+
+ // invalid sampling rate, allow deviation of 1 sample/sec
+- if (rc < 0 || abs(samplingRate - targetRate) > 1) {
++ if (rc < 0 || abs((int)(samplingRate - targetRate) > 1)) {
+ debug_message("audio device %s doesn't support sampling rate %u",
+ m_deviceName, targetRate);
+ continue;
diff --git a/multimedia/mpeg4ip/files/patch-server_mp4live_audio__oss__source.h b/multimedia/mpeg4ip/files/patch-server_mp4live_audio__oss__source.h
new file mode 100644
index 0000000..c3e0f7a
--- /dev/null
+++ b/multimedia/mpeg4ip/files/patch-server_mp4live_audio__oss__source.h
@@ -0,0 +1,11 @@
+--- server/mp4live/audio_oss_source.h.orig 2006-05-15 17:52:52 UTC
++++ server/mp4live/audio_oss_source.h
+@@ -104,7 +104,7 @@ class CAudioCapabilities : public CCapab
+ return rate;
+ }
+ int32_t calc;
+- calc = abs(m_samplingRates[ix] - rate);
++ calc = abs((int)(m_samplingRates[ix] - rate));
+ if (calc < diff) {
+ diff = calc;
+ ret_rate = m_samplingRates[ix];
OpenPOWER on IntegriCloud