diff --git a/dlls/wsock32/wscontrol.h b/dlls/wsock32/wscontrol.h
index 4142701881972d23c1b2f04e6a796b541e0b8c66..8e80e641f876612f44690f1535b51c728344192d 100644
--- a/dlls/wsock32/wscontrol.h
+++ b/dlls/wsock32/wscontrol.h
@@ -119,9 +119,13 @@ typedef struct IPAddrEntry
    ushort         iae_pad;
 } IPAddrEntry;
 
-#ifdef __NetBSD__
+#ifdef if_type
 #undef if_type
+#endif
+#ifdef if_mtu
 #undef if_mtu
+#endif
+#ifdef if_lastchange
 #undef if_lastchange
 #endif