This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] scsi/sg.h: include sys/types.h for size_t
- From: Carlos O'Donell <carlos at systemhalted dot org>
- To: Mike Frysinger <vapier at gentoo dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Sun, 13 Jan 2013 11:57:35 -0500
- Subject: Re: [PATCH] scsi/sg.h: include sys/types.h for size_t
- References: <1358034819-24949-1-git-send-email-vapier@gentoo.org>
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.
>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
>
> 2013-01-12 Mike Frysinger <vapier@gentoo.org>
>
> * sysdeps/unix/sysv/linux/scsi/sg.h: Include sys/types.h.
> ---
> sysdeps/unix/sysv/linux/scsi/sg.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/sysdeps/unix/sysv/linux/scsi/sg.h b/sysdeps/unix/sysv/linux/scsi/sg.h
> index 9cad76e..47efcb0 100644
> --- a/sysdeps/unix/sysv/linux/scsi/sg.h
> +++ b/sysdeps/unix/sysv/linux/scsi/sg.h
> @@ -26,6 +26,7 @@
> #define _SCSI_SG_H 1
>
> #include <features.h>
> +#include <sys/types.h>
>
>
> /* New interface introduced in the 3.x SG drivers follows */
>
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.
Cheers,
Carlos.