]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Fix Bug #612: Erroneous FAR macro
authorDanny Mayer <mayer@ntp.org>
Sat, 20 May 2006 23:15:50 +0000 (19:15 -0400)
committerDanny Mayer <mayer@ntp.org>
Sat, 20 May 2006 23:15:50 +0000 (19:15 -0400)
bk: 446fa3261eHpkZAtXDWORXwECo8ojw

libntp/ntp_rfc2553.c
ports/winnt/libntp/dnslookup.c

index f2520a7eb2a09381408db0e281345c9ff5a0f0f0..e63781cb2089bfe66eeb3e4375683ab22d819e3c 100644 (file)
@@ -74,9 +74,6 @@
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
-#ifndef SYS_WINNT
-#include <netdb.h>
-#endif
 #include "ntp_rfc2553.h"
 
 #include "ntpd.h"
@@ -109,7 +106,7 @@ static char *ai_errlist[] = {
  */
 int
 DNSlookup_name(
-       const char FAR *name,
+       const char *name,
        int ai_family,
        struct hostent **Addresses
 );
@@ -120,7 +117,7 @@ DNSlookup_name(
  */
 int
 DNSlookup_name(
-       const char FAR *name,
+       const char *name,
        int ai_family,
        struct hostent **Addresses
 )
index 827b00706a49634211626db7bc7a15f5c03a00f8..b304b775e4fb01ce47d6b4993a2138972ddb9838 100644 (file)
@@ -53,7 +53,7 @@ int ReturnCode(int errcode)
        case 0:
                return (0);
        case WSAEINVAL:
-               return (EAI_BADHINTS);
+               return (EAI_BADFLAGS);
        case WSANO_DATA:
                return (EAI_NONAME);
        case WSANOTINITIALISED:
@@ -62,7 +62,7 @@ int ReturnCode(int errcode)
        case WSA_NOT_ENOUGH_MEMORY:
                return (EAI_MEMORY);
        default:
-               return (EAI_SYSTEM);
+               return (EAI_FAIL);
        }
 }
 
@@ -98,7 +98,7 @@ AddToAddresses(char **Addresses, int *cnt, CSADDR_INFO *csaddr)
 
 int
 DNSlookup_name(
-       const char FAR *name,
+       const char *name,
        int ai_family,
        struct hostent **Addresses
 )