[PATCH v2] scsi/sg.h: include stddef.h for size_t

Mike Frysinger vapier@gentoo.org
Mon Jan 14 17:38:00 GMT 2013


On Sunday 13 January 2013 17:41:34 Joseph S. Myers wrote:
> On Sun, 13 Jan 2013, Mike Frysinger wrote:
> > This header uses size_t but doesn't include stddef.h for it.  So when
> > packages happen to include this before any header that defines size_t,
> > they get a build failure.
> 
> stddef.h defines offsetof; I don't see any good reason for that to be
> defined by this header.  If size_t is all that's wanted from stddef.h, I
> think you should define __need_size_t before the #include to avoid
> bringing in other extraneous definitions such as offsetof.

seems like over kill considering we're talking about Linux-specific headers 
that cover kernel ABIs, but i don't care enough to fight over it
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20130114/69a26cc2/attachment.sig>


More information about the Libc-alpha mailing list