diff --git a/util.c b/util.c
index b35e1b6..8921c86 100644
--- a/util.c
+++ b/util.c
@@ -16,6 +16,10 @@
* along with Vanitygen. If not, see .
*/
+#if defined(_WIN32)
+#define _USE_MATH_DEFINES
+#endif /* defined(_WIN32) */
+
#include
#include
#include