Index: sshd.c =================================================================== --- sshd.c +++ sshd.c @@ -65,6 +65,7 @@ #endif #include #include +#include #include #include #include @@ -2130,6 +2131,17 @@ ssh_signal(SIGCHLD, SIG_DFL); ssh_signal(SIGINT, SIG_DFL); +#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.