[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#715321: /usr/include/net/if_bridgevar.h: Missing #include <stdint.h>



Le Mon, 8 Jul 2013 00:47:00 +0200,
Robert Millan <rmh@debian.org> a écrit :

> 2013/7/7 Laurent Bigonville <bigon@debian.org>:
> > /usr/include/net/if_bridgevar.h is explicitly using types like
> > "uint32_t"
> >
> > Shouldn't an include for <stdint.h> be added?
> 
> This is intentional upstream policy (to avoid header pollution).
> Programs which include <net/if_bridevar.h> are expected to include
> <stdint.h> first.
> 
> However, because <stdint.h> is not available to kernel code. A lot of
> code from FreeBSD tends to use <sys/types.h> instead, even in cases
> where it is only intended for userland.
> 
> So you probably just need to replace that <sys/types.h> in your code.

This doesn't look enough, I still get the same errors if I'm adding
<sys/types.h>:

/usr/include/net/if_bridgevar.h:124:2: error: unknown type name 'uint32_t'
  uint32_t ifbr_ifsflags;  /* member if flags */
[...]

This is what the configure is trying to compile:

=====8<=====

 #include <sys/types.h>
 #include <net/if.h>
 #include <net/ethernet.h>
 #include <net/if_bridgevar.h>


 int
 main ()
 {
 #ifndef BRDGSFD
 #ifdef __cplusplus
   (void) BRDGSFD;
 #else
   (void) BRDGSFD;
 #endif
 #endif

   ;
   return 0;
 }

=====8<=====

Cheers

Laurent Bigonville


Reply to: