diff --git a/miltermodule.c b/miltermodule.c
index d20f4129b529f8f0decd42ecfaf76d1504f75191..e64561fd07dd9ab3d3c2d576c3f2cf6ccc98854c 100644
--- a/miltermodule.c
+++ b/miltermodule.c
@@ -282,7 +282,7 @@ $ python setup.py help
  * published.  Unfortunately I know of no good way to do this
  * other than with OS-specific tests.
  */
-#if defined(__FreeBSD_kernel__) || defined(__linux__)
+#if defined(__FreeBSD__) || defined(__linux__)
 #define HAVE_IPV6_RFC2553
 #include <arpa/inet.h>
 #endif