only define WIN32 if it is not already defined
diff --git a/src/rand/rand.c b/src/rand/rand.c
index 9802a92..ff89ebb 100644
--- a/src/rand/rand.c
+++ b/src/rand/rand.c
@@ -15,8 +15,10 @@
  * WIN32 or WINDOWS needs to be defined, otherwise we get a
  * warning.
  */
-#ifdef MS_WINDOWS 
-#define WIN32
+#ifdef MS_WINDOWS
+#  ifndef WIN32
+#      define WIN32
+#  endif
 #endif
 #include <openssl/rand.h>