Date: Mon, 06 Jun 2016 15:36:20 +0000 From: bugzilla-noreply@freebsd.org To: gnome@FreeBSD.org Subject: [Bug 209077] net/opal: Fix build with libc++ 3.8.0 Message-ID: <bug-209077-6497-tuppOVRPbx@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-209077-6497@https.bugs.freebsd.org/bugzilla/> References: <bug-209077-6497@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D209077 --- Comment #3 from Dimitry Andric <dim@FreeBSD.org> --- E.g. something like this: --- plugins/video/common/mpi.cxx.orig 2013-02-20 02:18:05 UTC +++ plugins/video/common/mpi.cxx @@ -118,6 +118,11 @@ unsigned MPIList::getSupportedMPI( unsig return PLUGINCODEC_MPI_DISABLED; } +static inline unsigned udiff(unsigned u, unsigned v) +{ + return u >=3D v ? u - v : v - u; +} + bool MPIList::getNegotiatedMPI( unsigned* width, unsigned* height, unsigne= d* _frameTime) { unsigned i =3D 0; @@ -132,8 +137,8 @@ bool MPIList::getNegotiatedMPI( unsigned // to the desired one or matches it for (i=3D0; i < MPIs.size(); i++) { // we square the value in order to get absolute distances - distance =3D ( abs(MPIs[i].width - desiredWidth ) * - abs(MPIs[i].height - desiredHeight) ); + distance =3D ( udiff(MPIs[i].width, desiredWidth ) * + udiff(MPIs[i].height, desiredHeight) ); if (distance < minDistance) { minDistance =3D distance; --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-209077-6497-tuppOVRPbx>