diff --git a/util/env_windows.cc b/util/env_windows.cc
index 93555a8..14e41e9 100644
--- a/util/env_windows.cc
+++ b/util/env_windows.cc
@@ -4,7 +4,9 @@
 
 // Prevent Windows headers from defining min/max macros and instead
 // use STL.
+#ifndef NOMINMAX
 #define NOMINMAX
+#endif  // ifndef NOMINMAX
 #include <windows.h>
 
 #include <algorithm>