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

Carlos O'Donell carlos@systemhalted.org
Sun Jan 13 19:15:00 GMT 2013


On 01/13/2013 01:20 PM, 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.
> 
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> 
> 2013-01-12  Mike Frysinger  <vapier@gentoo.org>
> 
> 	* sysdeps/unix/sysv/linux/scsi/sg.h: Include stddef.h.
> ---
> v2
> 	- use stddef.h rather than 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..3e07b1c 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 <stddef.h>
>  
>  
>  /* New interface introduced in the 3.x SG drivers follows */
> 

Reviewed-by: Carlos O'Donell  <carlos@systemhalted.org>

This looks good to me.

Cheers,
Carlos.



More information about the Libc-alpha mailing list