From: Julian Ospald <hasufell@gentoo.org>
Date: Mon Oct 29 19:15:35 UTC 2012
Subject: fix compilation for gcc-4.7

	https://bugs.gentoo.org/show_bug.cgi?id=440134

--- source/shared_lib/sources/util/util.cpp
+++ source/shared_lib/sources/util/util.cpp
@@ -9,6 +9,8 @@
 //	License, or (at your option) any later version
 // ==============================================================
 
+#include <unistd.h>
+
 #include "util.h"
 
 #include <ctime>
--- source/shared_lib/include/graphics/math_util.h
+++ source/shared_lib/include/graphics/math_util.h
@@ -184,10 +184,10 @@
 
 	Rect2<T> computeBoundingRect() const{
 		return Rect2i(
-			min(p[0].x, p[1].x), 
-			min(p[0].y, p[2].y), 
-			max(p[2].x, p[3].x), 
-			max(p[1].y, p[3].y));
+			std::min(p[0].x, p[1].x), 
+			std::min(p[0].y, p[2].y), 
+			std::max(p[2].x, p[3].x), 
+			std::max(p[1].y, p[3].y));
 	}
 
 	bool isInside(const Vec2<T> &pt) const{
