NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/58678: ntpd crashes on sparc64
The following reply was made to PR bin/58678; it has been noted by GNATS.
From: Martin Husemann <martin%duskware.de@localhost>
To: Christos Zoulas <christos%zoulas.com@localhost>
Cc: gnats-bugs%netbsd.org@localhost
Subject: Re: bin/58678: ntpd crashes on sparc64
Date: Thu, 19 Sep 2024 22:21:28 +0200
--sm4nu43k4a2Rpi4c
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
This patch seems to work for me.
Martin
--sm4nu43k4a2Rpi4c
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="ntpd.patch"
Index: external/bsd/ntp/dist/include/ntp.h
===================================================================
RCS file: /cvsroot/src/external/bsd/ntp/dist/include/ntp.h,v
retrieving revision 1.13
diff -u -r1.13 ntp.h
--- external/bsd/ntp/dist/include/ntp.h 18 Aug 2024 20:46:50 -0000 1.13
+++ external/bsd/ntp/dist/include/ntp.h 19 Sep 2024 20:03:53 -0000
@@ -859,18 +859,25 @@
restrict_u * link; /* link to next entry */
u_int32 count; /* number of packets matched */
u_int32 expire; /* valid until current_time */
- u_short rflags; /* restrict (accesslist) flags */
u_int32 mflags; /* match flags */
+ u_short rflags; /* restrict (accesslist) flags */
short ippeerlimit; /* limit of associations matching */
union { /* variant starting here */
res_addr4 v4;
res_addr6 v6;
} u;
};
+
+#if defined(_LP64_) && (defined(__sparc__) || defined(__mips__) \
+ || defined(__powerpc__))
+#define V4_SIZEOF_RESTRICT_U sizeof(restrict_u)
+#define V6_SIZEOF_RESTRICT_U sizeof(restrict_u)
+#else
#define V4_SIZEOF_RESTRICT_U (offsetof(restrict_u, u) \
+ sizeof(res_addr4))
#define V6_SIZEOF_RESTRICT_U (offsetof(restrict_u, u) \
+ sizeof(res_addr6))
+#endif
/* restrictions for (4) a given address */
typedef struct r4addr_tag r4addr;
--sm4nu43k4a2Rpi4c--
Home |
Main Index |
Thread Index |
Old Index