[PATCH] scsi/sg.h: include sys/types.h for size_t

Mike Frysinger vapier@gentoo.org
Sun Jan 13 18:08:00 GMT 2013


On Sunday 13 January 2013 11:57:35 Carlos O'Donell wrote:
> On 01/12/2013 06:53 PM, Mike Frysinger wrote:
> > This header uses size_t but doesn't include sys/types.h for it.  So when
> > packages happen to include this before any header that defines size_t,
> > they get a build failure.
> > 
> > --- a/sysdeps/unix/sysv/linux/scsi/sg.h
> > +++ b/sysdeps/unix/sysv/linux/scsi/sg.h
> >
> > +#include <sys/types.h>
> 
> Can we get away with `#include <stddef.h>'? That's the minimal
> header you need if you just want size_t. I'd like to avoid
> pulling in more than required.

should be ok.  i reached for sys/types.h since i knew it'd work.
-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/20130113/55aab6b7/attachment.sig>


More information about the Libc-alpha mailing list