diff --git a/qemu-char.c b/qemu-char.c
index 6ec90594e368b196b3c939c43555a1b5fe635a39..2144d1a471a99927190ebddf4274955984030a44 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -1920,7 +1920,7 @@ static int tcp_get_msgfd(CharDriverState *chr)
     return s->msgfd;
 }
 
-#ifndef WIN32
+#ifndef _WIN32
 static void unix_process_msgfd(CharDriverState *chr, struct msghdr *msg)
 {
     TCPCharDriver *s = chr->opaque;