Add an installer-fetchpkgs target and other related stuff to reduce the
[dragonfly.git] / secure / usr.sbin / sshd / sshd.c.patch
1 $DragonFly: src/secure/usr.sbin/sshd/Attic/sshd.c.patch,v 1.1 2004/07/31 20:05:00 geekgod Exp $
2 --- sshd.c.orig 2004-07-23 14:26:51.000000000 +0200
3 +++ sshd.c      2004-07-23 14:20:00.000000000 +0200
4 @@ -53,6 +53,10 @@
5  #include <prot.h>
6  #endif
7  
8 +#ifdef __DragonFly__
9 +#include <resolv.h>
10 +#endif
11 +
12  #include "ssh.h"
13  #include "ssh1.h"
14  #include "ssh2.h"
15 @@ -1415,6 +1419,17 @@
16             sizeof(on)) < 0)
17                 error("setsockopt SO_KEEPALIVE: %.100s", strerror(errno));
18  
19 +#ifdef __DragonFly__
20 +       /*
21 +        * Initialize the resolver.  This may not happen automatically
22 +        * before privsep chroot().                                   
23 +        */
24 +       if ((_res.options & RES_INIT) == 0) {
25 +               debug("res_init()");         
26 +               res_init();         
27 +       }
28 +#endif
29 +
30         /*
31          * Register our connection.  This turns encryption off because we do
32          * not have a key.