diff --git a/ares/nameser.h b/ares/nameser.h
index fd496c57ac1ff816f8de2293d06c5a6ea8b4df66..9a2a6693cc3bc4c99dacec68393ced3ad788e5df 100644
--- a/ares/nameser.h
+++ b/ares/nameser.h
@@ -16,8 +16,8 @@
 
 #define EINPROGRESS WSAEINPROGRESS
 #define EWOULDBLOCK WSAEWOULDBLOCK
-#define EMSGSIZE ERANGE /* FIX: is there a better replacement? */
-#define EAFNOSUPPORT ERANGE /* FIX: is there a better replacement? */
+#define EMSGSIZE WSAEMSGSIZE
+#define EAFNOSUPPORT WSAEAFNOSUPPORT
 
 /* Structure for scatter/gather I/O.  */
 struct iovec