[PATCH 11/13] Installed-header hygiene (BZ#20366): struct osockaddr.

Carlos O'Donell carlos@redhat.com
Wed Sep 21 19:27:00 GMT 2016


On 08/29/2016 09:16 PM, Zack Weinberg wrote:
> sys/socket.h defines struct osockaddr only under __USE_MISC, whereas
> protocols/talkd.h requires it unconditionally.  This is another place
> where the bits/types/foo.h approach comes in handy.
> 
> I would also be amenable to removing struct osockaddr from sys/socket.h,
> defining it only in protocols/talkd.h, on the theory that nothing else
> should be using it anymore.  (Frankly, I doubt anyone would miss
> protocols/talkd.h at this point, but we _have_ historically preferred
> not to delete anything.)

Without a strong reason for deleting it we should keep it :-)
 
> 	* socket/bits/types/struct_osockaddr.h: New header.
> 	* include/bits/types/struct_osockaddr.h: New wrapper.
> 	* socket/Makefile: Install the new header.
> 	* socket/sys/socket.h
> 	* inet/protocols/talkd.h: Refer to bits/types/struct_osockaddr.h
> 	for the definition of struct osockaddr.

LGTM.

-- 
Cheers,
Carlos.



More information about the Libc-alpha mailing list