From: Danny Mayer Date: Sat, 20 May 2006 21:01:51 +0000 (-0400) Subject: Bug fixes for #611, 612, 614 and 530 X-Git-Tag: NTP_4_2_1P253_RC~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6721b82f2b3f7accb2ce48ea32b0abfacd452733;p=thirdparty%2Fntp.git Bug fixes for #611, 612, 614 and 530 bk: 446f83bfrjYA-l6X2QNvLp8WScErsQ --- diff --git a/libntp/ntp_rfc2553.c b/libntp/ntp_rfc2553.c index e4bdc3f5a..f2520a7eb 100644 --- a/libntp/ntp_rfc2553.c +++ b/libntp/ntp_rfc2553.c @@ -104,7 +104,9 @@ static char *ai_errlist[] = { "Unknown error", /* EAI_MAX */ }; - +/* + * Local declaration + */ int DNSlookup_name( const char FAR *name, @@ -256,7 +258,7 @@ getaddrinfo (const char *nodename, const char *servname, port = 0; /* - /* + * * Set up the port number */ if (ai->ai_family == AF_INET) diff --git a/ntpd/ntp_intres.c b/ntpd/ntp_intres.c index 43d8270e1..1ea07ce4d 100644 --- a/ntpd/ntp_intres.c +++ b/ntpd/ntp_intres.c @@ -528,7 +528,7 @@ findhostaddr( /* * If the resolver failed, see if the failure is - * temporary. If so, return success. + * temporary. If so, return success. */ if (error != 0) { switch (error) diff --git a/ntpd/ntp_io.c b/ntpd/ntp_io.c index d122555bd..cd571f242 100644 --- a/ntpd/ntp_io.c +++ b/ntpd/ntp_io.c @@ -1510,16 +1510,18 @@ open_socket( } #endif /* SYS_WINNT */ -#ifdef F_DUPFD +#if !defined(SYS_WINNT) && defined(F_DUPFD) /* * Fixup the file descriptor for some systems + * See bug #530 for details of the issue. */ fd = dup_fd(fd); #endif - - /* set SO_REUSEADDR since we will be binding the same port - number on each interface */ + /* + * set SO_REUSEADDR since we will be binding the same port + * number on each interface + */ if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char *)&on, sizeof(on))) {