From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [B.A.T.M.A.N.] musl build fixes
Date: Wed, 01 Apr 2015 19:36:10 +0200 [thread overview]
Message-ID: <2646597.jD5Rzrq2qD@sven-desktop> (raw)
In-Reply-To: <20150401171821.GA21008@vostro>
On Wednesday 01 April 2015 20:18:21 Alex Suykov wrote:
> batctl-2014.4.0 fails to build with musl, mostly because of somewhat
> weird netinet/*.h headers musl provides, but the problem turns out
> to be easy to fix.
>
> musl does not allow including netinet/* and linux/* headers together.
> batctl includes netinet/if_ether.h indirectly via net/ethernet.h,
> so netinet/if_ether.h must be used instead of linux/if_ether.h.
>
> __be16 and __be32 are linux-specific typedefs for uint16_t and
> uint32_t with __attribute__((bitwise)) that has no effect
> outside of the kernel. Replacing them with uint16_t and uint32_t
> removes dependency on linux/types.h.
>
> Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
Nacked-by: Sven Eckelmann <sven@narfation.org>
The __be32, __be16 are from the kernel and used there to check if data was
correctly converted from host byte order to big endian (and the other way
around). batctl just uses the packet.h from the kernel module. Removing them
from the userspace would mean that it gets removed from the kernel module.
This would mean that someone has send this "weird" commit to the next linux
kernel maintainer. And I am quite happy that I will not be this person.
See https://lists.open-mesh.org/pipermail/b.a.t.m.a.n/2015-March/012926.html
for a proposal how to provide headers which are not yet part of linux-libc-dev
(linux kernel uapi headers).
Kind regards,
Sven
next prev parent reply other threads:[~2015-04-01 17:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-01 17:18 [B.A.T.M.A.N.] musl build fixes Alex Suykov
2015-04-01 17:36 ` Sven Eckelmann [this message]
2015-04-01 19:35 ` Alex Suykov
2015-04-01 20:02 ` Sven Eckelmann
2015-04-01 21:53 ` Alex Suykov
2015-04-02 6:39 ` Sven Eckelmann
2015-04-06 14:27 ` Alex Suykov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2646597.jD5Rzrq2qD@sven-desktop \
--to=sven@narfation.org \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox