diff --git a/src/voxel.h b/src/voxel.h
index 472f0740dda960addcb7193ce7ac6b9e95f08847..43e0baa7aff3d13d447bd167d2f007bf2b60f958 100644
--- a/src/voxel.h
+++ b/src/voxel.h
@@ -25,6 +25,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "debug.h"
 #include "mapnode.h"
 
+#undef min
+#undef max
+
 /*
 	A fast voxel manipulator class