--- Modules/socketmodule.c.orig Tue Aug 23 09:41:24 2011 +++ Modules/socketmodule.c Tue Aug 23 10:43:08 2011 @@ -156,6 +156,10 @@ # undef HAVE_GETHOSTBYNAME_R_6_ARG #endif +#if defined(__OpenBSD__) +# include +#endif + #ifndef WITH_THREAD # undef HAVE_GETHOSTBYNAME_R #endif