]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
IPv6 fixes to handle both NTP and ISC definitions.
authorDanny Mayer <mayer@ntp.org>
Thu, 6 Feb 2003 03:58:52 +0000 (22:58 -0500)
committerDanny Mayer <mayer@ntp.org>
Thu, 6 Feb 2003 03:58:52 +0000 (22:58 -0500)
bk: 3e41dd7cQiAQi1JAsX1ziAgrDd1mcQ

include/isc/netaddr.h
include/ntp_rfc2553.h
libntp/ntp_rfc2553.c

index 94f0f0c2d2dcc675d6b69f87436712b0d5b92c32..811e8dd48e0c8162c6022b81560a05677e1ee318 100644 (file)
@@ -23,6 +23,9 @@
 #include <isc/lang.h>
 #include <isc/net.h>
 #include <isc/types.h>
+#include "ntp_rfc2553.h"
+
+
 
 ISC_LANG_BEGINDECLS
 
index b9160f9d538de9614b3bb43037f631cf95c56924..a06efcf770519ac5c1861aec46b267a8416ad90e 100644 (file)
@@ -96,6 +96,12 @@ typedef struct u_int64_t { u_int32 val[2]; } u_int64_t;
 #ifdef SYS_WINNT
 #define in6_addr in_addr6
 #else
+/*
+ * Don't include any additional IPv6 definitions
+ * We are defining our own here.
+ */
+#define ISC_IPV6_H 1
+
 struct in6_addr {
        union {
                u_int8_t   __u6_addr8[16];
index 313598070e68cc896fd6fa4b22f9edd8ec4853a1..2f038e2a5bb1baf7b7494ab392c5cff0ddd9195c 100644 (file)
@@ -251,7 +251,7 @@ do_nodename(
        ai->ai_addr->sa_len = sizeof(struct sockaddr);
 #endif
        if (hints != NULL && hints->ai_flags & AI_CANONNAME) {
-               ai->ai_canonname = malloc(strlen(hp->h_name));
+               ai->ai_canonname = malloc(strlen(hp->h_name) + 1);
                if (ai->ai_canonname == NULL)
                        return (EAI_MEMORY);
                strcpy(ai->ai_canonname, hp->h_name);