[vdagent-win PATCH 03/13] Fix minor compiler compatibility

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Assure std::min is declared including directly algorithm header.
Undefine possible min and max macros, some Windows headers define them.
Currently happens using Visual Studio 2015.

Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]