[Spice-devel] [vdagent-win PATCH 03/13] Fix minor compiler compatibility
Christophe Fergeau
cfergeau at redhat.com
Mon May 28 12:57:14 UTC 2018
On Mon, May 28, 2018 at 09:57:56AM +0100, Frediano Ziglio wrote:
> Assure std::min is declared including directly algorithm header.
"ensure" ?
> Undefine possible min and max macros, some Windows headers define them.
> Currently happens using Visual Studio 2015.
Huhu, not nice :((
Christophe
>
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
> vdagent/image.cpp | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/vdagent/image.cpp b/vdagent/image.cpp
> index 1b21b53..c0bcdb5 100644
> --- a/vdagent/image.cpp
> +++ b/vdagent/image.cpp
> @@ -18,11 +18,15 @@
> #include <spice/macros.h>
> #include <memory>
> #include <vector>
> +#include <algorithm>
>
> #include "vdcommon.h"
> #include "image.h"
> #include "imagepng.h"
>
> +#undef max
> +#undef min
> +
> static ImageCoder *get_coder(uint32_t vdagent_type)
> {
> switch (vdagent_type) {
> --
> 2.17.0
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20180528/94d53e6f/attachment-0001.sig>
More information about the Spice-devel
mailing list