[Olsr-dev] [PATCH] plugins: fix build with musl
Daniel Golle
(spam-protected)
Fri May 15 23:02:59 CEST 2015
Hi!
On Fri, May 15, 2015 at 10:50:24PM +0200, Henning Rogge wrote:
> Wow,
>
> this was A LOT of activity...
>
> is there a special reason why musl does not use the same headers as
> the other libraries?
The conflicting definitions seem to stem from *BSD vs. GNU systems.
glibc defines them both:
--- netinet/udp.h
/* UDP header as specified by RFC 768, August 1980. */
struct udphdr
{
__extension__ union
{
struct
{
u_int16_t uh_sport; /* source port */
u_int16_t uh_dport; /* destination port */
u_int16_t uh_ulen; /* udp length */
u_int16_t uh_sum; /* udp checksum */
};
struct
{
u_int16_t source;
u_int16_t dest;
u_int16_t len;
u_int16_t check;
};
};
};
---
Various libc's found in the wild define either or both definitions.
'uh_sport' is more intuitive than 'source' which could mean a lot
of things imho.
Cheers
Daniel
More information about the Olsr-dev
mailing list