Subject: new ntpd fails to compile on alpha...
To: None <current-users@netbsd.org>
From: Kurt Schreiner <ks@ub.uni-mainz.de>
List: current-users
Date: 07/29/2006 16:28:21
Hi,
the just checked in ntpd fails to compile on alpha with:
[...]
cc1: warnings being treated as errors
/u/NetBSD/src/dist/ntp/ntpd/ntp_io.c: In function 'read_network_packet':
/u/NetBSD/src/dist/ntp/ntpd/ntp_io.c:2249: warning: passing argument 6 of 'recvfrom' from incompatib
le pointer type
/u/NetBSD/src/dist/ntp/ntpd/ntp_io.c:2269: warning: passing argument 6 of 'recvfrom' from incompatib
le pointer type
/u/NetBSD/src/dist/ntp/ntpd/ntp_io.c: In function 'findlocalinterface':
/u/NetBSD/src/dist/ntp/ntpd/ntp_io.c:2557: warning: passing argument 3 of 'getsockname' from incompa
tible pointer type
[...]
With the following patches compiling is ok:
--- /u/NetBSD/src/dist/ntp/ntpd/ntp_io.c 2006-07-29 14:28:14.000000000 +0200
+++ /u/NetBSD/lsrc/dist/ntp/ntpd/ntp_io.c 2006-07-29 16:09:20.000000000 +0200
@@ -2224,7 +2224,7 @@
static inline int
read_network_packet(SOCKET fd, struct interface *itf, l_fp ts)
{
- size_t fromlen;
+ socklen_t fromlen;
int buflen;
register struct recvbuf *rb;
@@ -2510,7 +2510,7 @@
SOCKET s;
int rtn, i, idx;
struct sockaddr_storage saddr;
- size_t saddrlen = SOCKLEN(addr);
+ socklen_t saddrlen = SOCKLEN(addr);
#ifdef DEBUG
if (debug>2)
printf("Finding interface for addr %s in list of addresses\n",
--- /u/NetBSD/src/dist/ntp/ntpd/refclock_oncore.c 2006-06-12 21:43:18.000000000 +0200
+++ /u/NetBSD/lsrc/dist/ntp/ntpd/refclock_oncore.c 2006-07-29 16:16:02.000000000 +0200
@@ -3318,7 +3318,7 @@
/* and set time to time from Computer clock */
gettimeofday(&tv, 0);
- tm = gmtime((const time_t *) &tv.tv_sec);
+ tm = gmtime((const time_t *)(long) &tv.tv_sec);
#if 1
{
char Msg[160];
Kurt