From 52cbcbf0bb5ee685f77449f68c59926320bfe85f Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sat, 16 Sep 2000 16:21:28 +1100 Subject: [PATCH] - (djm) Use a real struct sockaddr inside the fake struct sockaddr_storage. Patch from Larry Jones --- ChangeLog | 2 ++ fake-socket.h | 12 ++++-------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5db81bca8..507469abc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,6 @@ 20000916 + - (djm) Use a real struct sockaddr inside the fake struct sockaddr_storage. + Patch from Larry Jones - (djm) Add Steve VanDevender's PAM password change patch. - (djm) Bring licenses on my stuff in line with OpenBSD's diff --git a/fake-socket.h b/fake-socket.h index 0e1624d11..b51caa030 100644 --- a/fake-socket.h +++ b/fake-socket.h @@ -6,17 +6,13 @@ #ifndef HAVE_STRUCT_SOCKADDR_STORAGE # define _SS_MAXSIZE 128 /* Implementation specific max size */ -# define _SS_ALIGNSIZE (sizeof(int)) -# define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(u_short)) -# define _SS_PAD2SIZE (_SS_MAXSIZE - (sizeof(u_short) + \ - _SS_PAD1SIZE + _SS_ALIGNSIZE)) +# define _SS_PADSIZE (_SS_MAXSIZE - sizeof (struct sockaddr)) struct sockaddr_storage { - u_short ss_family; - char __ss_pad1[_SS_PAD1SIZE]; - int __ss_align; - char __ss_pad2[_SS_PAD2SIZE]; + struct sockaddr ss_sa; + char __ss_pad2[_SS_PADSIZE]; }; +# define ss_family ss_sa.sa_family #endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */ #ifndef IN6_IS_ADDR_LOOPBACK