]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Modification to correct for type errors
authorDanny Mayer <mayer@ntp.org>
Fri, 23 Apr 2004 23:23:39 +0000 (19:23 -0400)
committerDanny Mayer <mayer@ntp.org>
Fri, 23 Apr 2004 23:23:39 +0000 (19:23 -0400)
bk: 4089a57b6qX3i3OlEV2IYJAScyDfVg

include/ntp_rfc2553.h
include/ntp_types.h
ntpd/ntp_io.c

index fe629ed07f203b022b0220c7eea519f806d48cf8..ede8054e959e89bd5eb97f35212b22cda519c4ed 100644 (file)
@@ -90,8 +90,8 @@
 #define        _SS_MAXSIZE     128
 #define        _SS_ALIGNSIZE   (sizeof(ntp_uint64_t))
 #ifdef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
-#define        _SS_PAD1SIZE    (_SS_ALIGNSIZE - sizeof(u_char) - sizeof(u_int8_t))
-#define        _SS_PAD2SIZE    (_SS_MAXSIZE - sizeof(u_char) - sizeof(u_int8_t) - \
+#define        _SS_PAD1SIZE    (_SS_ALIGNSIZE - sizeof(u_char) - sizeof(ntp_u_int8_t))
+#define        _SS_PAD2SIZE    (_SS_MAXSIZE - sizeof(u_char) - sizeof(ntp_u_int8_t) - \
                                _SS_PAD1SIZE - _SS_ALIGNSIZE)
 #else
 #define        _SS_PAD1SIZE    (_SS_ALIGNSIZE - sizeof(short))
 #ifndef HAVE_STRUCT_SOCKADDR_STORAGE
 struct sockaddr_storage {
 #ifdef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
-       u_int8_t        ss_len;         /* address length */
-       u_int8_t        ss_family;      /* address family */
+       ntp_u_int8_t    ss_len;         /* address length */
+       ntp_u_int8_t    ss_family;      /* address family */
 #else
        short           ss_family;      /* address family */
 #endif
@@ -154,9 +154,9 @@ struct sockaddr_storage {
 
 struct in6_addr {
        union {
-               u_int8_t   __u6_addr8[16];
-               u_int16_t  __u6_addr16[8];
-               u_int32_t  __u6_addr32[4];
+               ntp_u_int8_t   __u6_addr8[16];
+               ntp_u_int16_t  __u6_addr16[8];
+               ntp_u_int32_t  __u6_addr32[4];
        } __u6_addr;                    /* 128-bit IP6 address */
 };
 
@@ -180,15 +180,15 @@ extern const struct in6_addr in6addr_any;
 #ifndef HAVE_SOCKADDR_IN6
 struct sockaddr_in6 {
 #ifdef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
-       u_int8_t        sin6_len;       /* length of this struct(sa_family_t)*/
-       u_int8_t        sin6_family;    /* AF_INET6 (sa_family_t) */
+       ntp_u_int8_t    sin6_len;       /* length of this struct(sa_family_t)*/
+       ntp_u_int8_t    sin6_family;    /* AF_INET6 (sa_family_t) */
 #else
        short           sin6_family;    /* AF_INET6 (sa_family_t) */
 #endif
-       u_int16_t       sin6_port;      /* Transport layer port # (in_port_t)*/
-       u_int32_t       sin6_flowinfo;  /* IP6 flow information */
+       ntp_u_int16_t   sin6_port;      /* Transport layer port # (in_port_t)*/
+       ntp_u_int32_t   sin6_flowinfo;  /* IP6 flow information */
        struct in6_addr sin6_addr;      /* IP6 address */
-       u_int32_t       sin6_scope_id;  /* scope zone index */
+       ntp_u_int32_t   sin6_scope_id;  /* scope zone index */
 };
 #endif
 
@@ -197,10 +197,10 @@ struct sockaddr_in6 {
  */
 #ifndef IN6_IS_ADDR_UNSPECIFIED
 #define IN6_IS_ADDR_UNSPECIFIED(a)     \
-       ((*(const u_int32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \
-        (*(const u_int32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \
-        (*(const u_int32_t *)(const void *)(&(a)->s6_addr[8]) == 0) && \
-        (*(const u_int32_t *)(const void *)(&(a)->s6_addr[12]) == 0))
+       ((*(const ntp_u_int32_t *)(const void *)(&(a)->s6_addr[0]) == 0) &&     \
+        (*(const ntp_u_int32_t *)(const void *)(&(a)->s6_addr[4]) == 0) &&     \
+        (*(const ntp_u_int32_t *)(const void *)(&(a)->s6_addr[8]) == 0) &&     \
+        (*(const ntp_u_int32_t *)(const void *)(&(a)->s6_addr[12]) == 0))
 #endif
 /*
  * Multicast
index c9b4a7ec8495b5c216fdde639082f363a23e0169..0b575c8c6ae384d3ecdb697678ecfcaa0b66e77d 100644 (file)
@@ -66,11 +66,9 @@ typedef unsigned int u_int;
 # include "Bletch: what's 32 bits on this machine?"
 #endif /* not sizeof(int) == 4 */
 
-#ifndef HAVE_TYPE_U_INT8_T
-typedef u_char         u_int8_t;
-typedef u_short                u_int16_t;
-typedef u_int32                u_int32_t;
-#endif /* HAVE_TYPE_U_INT8_T */
+typedef u_char         ntp_u_int8_t;
+typedef u_short                ntp_u_int16_t;
+typedef u_int32                ntp_u_int32_t;
 
 typedef struct ntp_uint64_t { u_int32 val[2]; } ntp_uint64_t;
 
index 0b71e790726750130e69f2b1f424875e9d599ebb..c0f16b9ca39eb9fa88a8f29172fc780898557f94 100644 (file)
@@ -683,6 +683,10 @@ io_multicast_add(
                        netsyslog(LOG_ERR,
                        "multicast address %s not class D",
                                inet_ntoa(iaddr));
+#ifdef DEBUG
+                       if (debug >= 4)
+                               printf("haddr value = %x\n", haddr);
+#endif
                        return;
                }
                for (i = nwilds; i < ninterfaces; i++) {