This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]