In message: <11606.1281464...@critter.freebsd.dk>
            "Poul-Henning Kamp" <p...@phk.freebsd.dk> writes:
: In message <20100810.115457.1126759349893144516....@bsdimp.com>, "M. Warner 
Los
: h" writes:
: >In message: <20100811.023235.13138059....@allbsd.org>
: >            Hiroki Sato <h...@freebsd.org> writes:
: >: Oliver Fromme <o...@fromme.com> wrote
: >:   in <201008101623.o7agns7i042...@haluter.fromme.com>:
: >: 
: >: ol> -static int    validate(struct sockaddr *, const char *);
: >: ol> -static void   unmapped(struct sockaddr *);
: >: ol> +static int    validate(struct sockaddr_storage *, const char *);
: >: ol> +static void   unmapped(struct sockaddr_storage *);
: >: 
: >:  Why is s/struct sockaddr */struct sockaddr_storage */ needed here?
: >:  Using (struct sockaddr *) as an argument looks reasonable to me since
: >:  the struct sockaddr_storage is mostly for memory allocation, not for
: >:  access via pointer.
: >
: >Because struct sockaddr * has a too loose alignment requirement for
: >later casting, while sockaddr_storage has the proper alignment.
: 
: This is the kind of detail Bruce, Warner and I know, but I bet it
: was news to most of you.
: 
: Somebody should add it to the relevant manualpages...

It was news to me when I saw it :)  But given other posix requirements
for this interface, maybe there's a better fix...

Warner
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to