From: Danny Mayer Date: Sun, 27 Dec 2009 21:02:00 +0000 (+0000) Subject: [Bug 1443] Remove unnecessary dependencies on ntp_io.h X-Git-Tag: NTP_4_2_7P6~5^2~5^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b21482489ae39b6fec7e82fae626be8eca0f9d96;p=thirdparty%2Fntp.git [Bug 1443] Remove unnecessary dependencies on ntp_io.h bk: 4b37cb48BIxdonv_3qVGhU0PAixOlA --- diff --git a/libntp/recvbuff.c b/libntp/recvbuff.c index 9a7d6caf4..39600211b 100644 --- a/libntp/recvbuff.c +++ b/libntp/recvbuff.c @@ -8,7 +8,6 @@ #include "ntp_fp.h" #include "ntp_syslog.h" #include "ntp_stdlib.h" -#include "ntp_io.h" #include "ntp_lists.h" #include "recvbuff.h" #include "iosignal.h" diff --git a/ntpd/ntp_io.c b/ntpd/ntp_io.c index 50d1da3fd..f15783951 100644 --- a/ntpd/ntp_io.c +++ b/ntpd/ntp_io.c @@ -100,6 +100,7 @@ nic_rule *nic_rule_list; #endif #if defined(SYS_WINNT) +#include "win32_io.h" #include /* * Windows C runtime ioctl() can't deal properly with sockets, @@ -300,43 +301,6 @@ static inline int read_refclock_packet (SOCKET, struct refclockio *, l_fp); #endif -#ifdef SYS_WINNT -/* - * Windows 2000 systems incorrectly cause UDP sockets using WASRecvFrom - * to not work correctly, returning a WSACONNRESET error when a WSASendTo - * fails with an "ICMP port unreachable" response and preventing the - * socket from using the WSARecvFrom in subsequent operations. - * The function below fixes this, but requires that Windows 2000 - * Service Pack 2 or later be installed on the system. NT 4.0 - * systems are not affected by this and work correctly. - * See Microsoft Knowledge Base Article Q263823 for details of this. - */ -void -connection_reset_fix( - SOCKET fd, - sockaddr_u * addr - ) -{ - DWORD dw; - BOOL bNewBehavior = FALSE; - DWORD status; - - /* - * disable bad behavior using IOCTL: SIO_UDP_CONNRESET - * NT 4.0 has no problem - */ - if (isc_win32os_majorversion() >= 5) { - status = WSAIoctl(fd, SIO_UDP_CONNRESET, &bNewBehavior, - sizeof(bNewBehavior), NULL, 0, - &dw, NULL, NULL); - if (SOCKET_ERROR == status) - msyslog(LOG_ERR, - "connection_reset_fix() failed for address %s: %m", - stoa(addr)); - } -} -#endif - /* * on Unix systems the stdio library typically * makes use of file descriptors in the lower diff --git a/ntpd/ntp_util.c b/ntpd/ntp_util.c index bf3725c01..2e56af119 100644 --- a/ntpd/ntp_util.c +++ b/ntpd/ntp_util.c @@ -6,7 +6,6 @@ #endif #include "ntpd.h" -#include "ntp_io.h" #include "ntp_unixtime.h" #include "ntp_filegen.h" #include "ntp_if.h" diff --git a/ntpdate/ntpdate.c b/ntpdate/ntpdate.c index 16b8e7fe0..205d7e5fa 100644 --- a/ntpdate/ntpdate.c +++ b/ntpdate/ntpdate.c @@ -13,7 +13,6 @@ #include "ntp_machine.h" #include "ntp_fp.h" #include "ntp.h" -#include "ntp_io.h" #include "ntp_unixtime.h" #include "ntpdate.h" #include "ntp_string.h" diff --git a/ntpdc/ntpdc.c b/ntpdc/ntpdc.c index 4bfb25ff2..53a3b050c 100644 --- a/ntpdc/ntpdc.c +++ b/ntpdc/ntpdc.c @@ -10,7 +10,6 @@ #include "ntpdc.h" #include "ntp_select.h" -#include "ntp_io.h" #include "ntp_stdlib.h" #include "ntp_assert.h" #include "ntp_lineedit.h" diff --git a/ntpq/ntpq.c b/ntpq/ntpq.c index d1ebc414e..03a3af7f1 100644 --- a/ntpq/ntpq.c +++ b/ntpq/ntpq.c @@ -13,7 +13,6 @@ #include "ntpq.h" #include "ntp_unixtime.h" #include "ntp_calendar.h" -#include "ntp_io.h" #include "ntp_select.h" #include "ntp_stdlib.h" #include "ntp_assert.h"