[PATCH] scanner: Fix building on musl

Pekka Paalanen ppaalanen at gmail.com
Thu Jun 23 11:14:50 UTC 2016


On Thu, 23 Jun 2016 07:52:16 +0200
Hardening <rdp.effort at gmail.com> wrote:

> Le 23/06/2016 01:48, Kylie McClain a écrit :
> > From: Kylie McClain <somasis at exherbo.org>
> > 
> > `uint` is defined in sys/types.h on musl libc.
> > 
> > Signed-off-by: Kylie McClain <somasis at exherbo.org>
> > ---
> >  src/scanner.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/src/scanner.c b/src/scanner.c
> > index 4708cae..48d6014 100644
> > --- a/src/scanner.c
> > +++ b/src/scanner.c
> > @@ -38,6 +38,7 @@
> >  #include <getopt.h>
> >  #include <limits.h>
> >  #include <unistd.h>
> > +#include <sys/types.h>
> >  
> >  #if HAVE_LIBXML
> >  #include <libxml/parser.h>
> >   
> Reviewed-By: David Fort <contact at hardening-consulting.com>
> 

NAK.

I didn't even know that 'uint' was a data type in standard headers. We
certainly do not have the habit of using it, it has just slipped past
review. Thank you for catching the typo.

The right fix would be to change 'uint' to 'uint32_t' if size matters,
or just 'unsigned'. Looks like size doesn't matter in the single
occurrence where it is used, so either is fine.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 811 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20160623/9d91db21/attachment.sig>


More information about the wayland-devel mailing list