Index: sshd.c =================================================================== --- sshd.c +++ sshd.c @@ -87,6 +87,7 @@ #endif #include "xmalloc.h" +#include #ifdef GSSAPI #include #endif @@ -2160,6 +2161,17 @@ } #endif +#ifdef __FreeBSD__ + /* + * Initialize the resolver. This may not happen automatically + * before privsep chroot(). + */ + if ((_res.options & RES_INIT) == 0) { + debug("res_init()"); + res_init(); + } +#endif + /* * Register our connection. This turns encryption off because we do * not have a key.