diff --git a/miltermodule.c b/miltermodule.c
index e64561fd07dd9ab3d3c2d576c3f2cf6ccc98854c..c6810057f28ba2fb78d815fb2d7707687d650bae 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__) || defined(__linux__)
+#if defined(__FreeBSD__) || defined(__linux__) || defined(__sun__)
 #define HAVE_IPV6_RFC2553
 #include <arpa/inet.h>
 #endif