convert to Makefile.autotools.in
[buildroot.git] / package / openntpd / openntpd-4.4-01-susv3-legacy.diff
blobb9920a0db93367c4c57f8900069fcd796b1c0f82
1 diff -rdup openntpd-4.4.orig/buffer.c openntpd-4.4/buffer.c
2 --- openntpd-4.4.orig/buffer.c 2005-08-11 18:26:29.000000000 +0200
3 +++ openntpd-4.4/buffer.c 2009-02-23 12:29:57.000000000 +0100
4 @@ -97,7 +97,7 @@ msgbuf_write(struct msgbuf *msgbuf)
5 int i = 0;
6 ssize_t n;
8 - bzero(&iov, sizeof(iov));
9 + memset(&iov, 0, sizeof(iov));
10 TAILQ_FOREACH(buf, &msgbuf->bufs, entry) {
11 if (i >= IOV_MAX)
12 break;
13 diff -rdup openntpd-4.4.orig/config.c openntpd-4.4/config.c
14 --- openntpd-4.4.orig/config.c 2006-05-27 19:01:07.000000000 +0200
15 +++ openntpd-4.4/config.c 2009-02-23 12:30:24.000000000 +0100
16 @@ -68,7 +68,7 @@ host_v4(const char *s)
17 struct sockaddr_in *sa_in;
18 struct ntp_addr *h;
20 - bzero(&ina, sizeof(struct in_addr));
21 + memset(&ina, 0, sizeof(struct in_addr));
22 if (inet_pton(AF_INET, s, &ina) != 1)
23 return (NULL);
25 @@ -89,7 +89,7 @@ host_v6(const char *s)
26 struct sockaddr_in6 *sa_in6;
27 struct ntp_addr *h = NULL;
29 - bzero(&hints, sizeof(hints));
30 + memset(&hints, 0, sizeof(hints));
31 hints.ai_family = AF_INET6;
32 hints.ai_socktype = SOCK_DGRAM; /*dummy*/
33 hints.ai_flags = AI_NUMERICHOST;
34 @@ -120,7 +120,7 @@ host_dns(const char *s, struct ntp_addr
35 struct sockaddr_in6 *sa_in6;
36 struct ntp_addr *h, *hh = NULL;
38 - bzero(&hints, sizeof(hints));
39 + memset(&hints, 0, sizeof(hints));
40 hints.ai_family = PF_UNSPEC;
41 hints.ai_socktype = SOCK_DGRAM; /* DUMMY */
42 error = getaddrinfo(s, NULL, &hints, &res0);
43 diff -rdup openntpd-4.4.orig/imsg.c openntpd-4.4/imsg.c
44 --- openntpd-4.4.orig/imsg.c 2007-03-19 11:03:25.000000000 +0100
45 +++ openntpd-4.4/imsg.c 2009-02-23 12:30:34.000000000 +0100
46 @@ -29,7 +29,7 @@ void
47 imsg_init(struct imsgbuf *ibuf, int fd)
49 msgbuf_init(&ibuf->w);
50 - bzero(&ibuf->r, sizeof(ibuf->r));
51 + memset(&ibuf->r, 0, sizeof(ibuf->r));
52 ibuf->fd = fd;
53 ibuf->w.fd = fd;
54 ibuf->pid = getpid();
55 diff -rdup openntpd-4.4.orig/ntp.c openntpd-4.4/ntp.c
56 --- openntpd-4.4.orig/ntp.c 2009-01-16 15:03:38.000000000 +0100
57 +++ openntpd-4.4/ntp.c 2009-02-23 12:30:55.000000000 +0100
58 @@ -150,7 +150,7 @@ ntp_main(int pipe_prnt[2], struct ntpd_c
59 TAILQ_FOREACH(p, &conf->ntp_peers, entry)
60 client_peer_init(p);
62 - bzero(&conf->status, sizeof(conf->status));
63 + memset(&conf->status, 0, sizeof(conf->status));
65 conf->freq.num = 0;
66 conf->freq.samples = 0;
67 @@ -205,8 +205,8 @@ ntp_main(int pipe_prnt[2], struct ntpd_c
68 pfd_elms = new_cnt;
71 - bzero(pfd, sizeof(struct pollfd) * pfd_elms);
72 - bzero(idx2peer, sizeof(void *) * idx2peer_elms);
73 + memset(pfd, 0, sizeof(struct pollfd) * pfd_elms);
74 + memset(idx2peer, 0, sizeof(void *) * idx2peer_elms);
75 nextaction = getmonotime() + 3600;
76 pfd[PFD_PIPE_MAIN].fd = ibuf_main->fd;
77 pfd[PFD_PIPE_MAIN].events = POLLIN;
78 diff -rdup openntpd-4.4.orig/ntpd.c openntpd-4.4/ntpd.c
79 --- openntpd-4.4.orig/ntpd.c 2009-01-16 15:03:38.000000000 +0100
80 +++ openntpd-4.4/ntpd.c 2009-02-23 12:31:05.000000000 +0100
81 @@ -94,7 +94,7 @@ main(int argc, char *argv[])
83 conffile = CONFFILE;
85 - bzero(&lconf, sizeof(lconf));
86 + memset(&lconf, 0, sizeof(lconf));
88 log_init(1); /* log to stderr until daemonized */
89 res_init(); /* XXX */
90 diff -rdup openntpd-4.4.orig/parse.y openntpd-4.4/parse.y
91 --- openntpd-4.4.orig/parse.y 2009-01-16 15:03:38.000000000 +0100
92 +++ openntpd-4.4/parse.y 2009-02-23 12:31:19.000000000 +0100
93 @@ -286,7 +286,7 @@ weight : WEIGHT NUMBER {
94 void
95 opts_default(void)
97 - bzero(&opts, sizeof opts);
98 + memset(&opts, 0, sizeof opts);
99 opts.weight = 1;
102 diff -rdup openntpd-4.4.orig/server.c openntpd-4.4/server.c
103 --- openntpd-4.4.orig/server.c 2009-01-16 15:03:38.000000000 +0100
104 +++ openntpd-4.4/server.c 2009-02-23 12:31:28.000000000 +0100
105 @@ -143,7 +143,7 @@ server_dispatch(int fd, struct ntpd_conf
107 version = (query.status & VERSIONMASK) >> 3;
109 - bzero(&reply, sizeof(reply));
110 + memset(&reply, 0, sizeof(reply));
111 if (lconf->status.synced)
112 reply.status = lconf->status.leap;
113 else