]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Provide INET6_ADDRSTRLEN if it is missing
authorHarlan Stenn <stenn@ntp.org>
Thu, 20 Nov 2008 05:41:10 +0000 (05:41 +0000)
committerHarlan Stenn <stenn@ntp.org>
Thu, 20 Nov 2008 05:41:10 +0000 (05:41 +0000)
bk: 4924f876bqSZwa8fmnuWlbxqjgqZjw

ChangeLog
include/ntp_rfc2553.h

index 83bb47e6f76a26e9f921e2ec7b2e0816c7f4fb97..117d7468e5e9930a8455c89eef0fad16d1005d13 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4 @@
+* Provide INET6_ADDRSTRLEN if it is missing.
 * [Bug 1095] overflow in caljulian.c.
 (4.2.5p144) 2008/11/19 Released by Harlan Stenn <stenn@ntp.org>
 * Use int32, not int32_t.
index da73362f9d20b8206fe4a3b92ab4fc385520f21f..8abdd4510cdfdeb62e2fba50663f320bf6ecfd17 100644 (file)
  */
 
 #ifndef AF_INET6
-#define AF_INET6       AF_MAX
-#define PF_INET6       AF_INET6
+# define AF_INET6      AF_MAX
+# define PF_INET6      AF_INET6
 #endif
 
 #if !defined(_SS_MAXSIZE) && !defined(_SS_ALIGNSIZE)
 
-#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(ntp_u_int8_t))
-#define        _SS_PAD2SIZE    (_SS_MAXSIZE - sizeof(u_char) - sizeof(ntp_u_int8_t) - \
+# 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(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))
-#define        _SS_PAD2SIZE    (_SS_MAXSIZE - sizeof(short) - \
+# else
+#  define      _SS_PAD1SIZE    (_SS_ALIGNSIZE - sizeof(short))
+#  define      _SS_PAD2SIZE    (_SS_MAXSIZE - sizeof(short) - \
                                _SS_PAD1SIZE - _SS_ALIGNSIZE)
-#endif /* HAVE_SA_LEN_IN_STRUCT_SOCKADDR */
+# endif /* HAVE_SA_LEN_IN_STRUCT_SOCKADDR */
+#endif
+
+#ifndef INET6_ADDRSTRLEN
+# define       INET6_ADDRSTRLEN        46      /* max len of IPv6 addr in ascii */
 #endif
 
 /*