On 10/06/2026 14:03, Rainer Jung wrote:
Am 10.06.26 um 14:06 schrieb Mark Thomas:
On 10/06/2026 12:59, Rainer Jung wrote:
Am 09.06.26 um 17:25 schrieb [email protected]:
This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat-connectors.git
The following commit(s) were added to refs/heads/main by this push:
new 4ebff9243 "struct sockaddr" is now required
4ebff9243 is described below
commit 4ebff92436892c5a232dae6be1b25bb15a22ae90
Author: Mark Thomas <[email protected]>
AuthorDate: Tue Jun 9 16:24:49 2026 +0100
"struct sockaddr" is now required
---
native/common/jk_global.h | 7 -------
native/configure.ac | 24 ++++++------------------
2 files changed, 6 insertions(+), 25 deletions(-)
diff --git a/native/common/jk_global.h b/native/common/jk_global.h
index f4680ef8b..7a0d2f1a5 100644
--- a/native/common/jk_global.h
+++ b/native/common/jk_global.h
@@ -352,7 +352,6 @@ extern "C"
(tv)->tv_usec = tb.millitm * 1000; }
#define HAVE_VSNPRINTF
#define HAVE_SNPRINTF
-#define HAVE_SOCKADDR_STORAGE
#define HAVE_AF_INET6
#define HAVE_GETADDRINFO
#ifdef HAVE_APR
@@ -473,13 +472,7 @@ struct jk_sockaddr_t {
/** IPv6 sockaddr structure */
struct sockaddr_in6 sin6;
#endif
- /** Placeholder to ensure that the size of this union is not
- * dependent on whether JK_HAVE_IPV6 is defined. */
Maybe we should keep these two lines of comments?
I thought that referred to the following ifdef block that I had removed.
It also didn't much sense to me since struct sockaddr_storage is
typically 128 bytes, as is the alternative char[].
sockaddr_in6 (which gets added with IPv6) is typically 28 bytes so the
size was going to vary by 28 bytes regardless,
I assume I am missing something.
The sockaddr_in, sockaddr_in6 and sockaddr_storage are in a union. So
the biggest alternative defines the final size. sockaddr_storage wins
against ip4 and ip6 and in case it wasn't found (in the original code),
the hand crafted char array would take that slot.
So IMHO, the sockaddr_storage is still there to give the final struct
jk_sockaddr_t a fixed length, independent of ip6 availability.
Ah. Got it. I'll add back an appropriate comment.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]