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

Bug#653193: Missing patch



On Sun, 2011-12-25 at 11:56:45 +0100, Robert Millan wrote:
> > +#define __FAVOR_BSD 1
> >  #include <netinet/in_systm.h>
> >  #include <netinet/in.h>
> >  #include <netinet/ip.h>
> >  #include <netinet/ip_icmp.h>
> >  #include <netinet/tcp.h>
> >  #include <netinet/udp.h>
> > +#undef __FAVOR_BSD
> 
> Shouldn't this kind of fix be in libbsd-dev?  E.g. in overlay netinet/in.h:
> 
> #if __FAVOR_BSD
> #  include_next <netinet/in.h>
> #else
> #  define __FAVOR_BSD 1
> #  include_next <netinet/in.h>
> #  undef __FAVOR_BSD
> #endif

I'd rather not, libbsd is there to help in porting by making embedded
sources unnecessary and adding missing declarations and similar, but
there's a limit to what extent it should include major hacks like this,
some times the source just need to be made more portable or fixed some
other way. In this case __FAVOR_BSD is an internal glibc macro, the
source should be using _BSD_SOURCE instead of _GNU_SOURCE, currently
passed through CFLAGS in debian/rules.

regards,
guillem



Reply to: