After another look at the current changes, switch directly to the in-tree
[dragonfly.git] / usr.sbin / ntpd / patches / log.c.patch
1 $DragonFly: src/usr.sbin/ntpd/patches/Attic/log.c.patch,v 1.1 2004/11/09 20:05:42 joerg Exp $
2
3 --- log.c.orig  2004-11-09 20:32:47.000000000 +0100
4 +++ log.c       2004-11-09 20:34:22.000000000 +0100
5 @@ -39,12 +39,10 @@
6  void
7  log_init(int n_debug)
8  {
9 -       extern char     *__progname;
10 -
11         debug = n_debug;
12  
13         if (!debug)
14 -               openlog(__progname, LOG_PID | LOG_NDELAY, LOG_DAEMON);
15 +               openlog(getprogname(), LOG_PID | LOG_NDELAY, LOG_DAEMON);
16  
17         tzset();
18  }
19 @@ -162,7 +160,7 @@
20  {
21         static char     buf[NI_MAXHOST];
22  
23 -       if (getnameinfo(sa, SA_LEN(sa), buf, sizeof(buf), NULL, 0,
24 +       if (getnameinfo(sa, sa->sa_len, buf, sizeof(buf), NULL, 0,
25             NI_NUMERICHOST))
26                 return ("(unknown)");
27         else