From patchwork Wed Apr 1 19:35:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Suykov X-Patchwork-Id: 4390 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.85.215.53; helo=mail-la0-f53.google.com; envelope-from=alex.suykov@gmail.com; receiver=b.a.t.m.a.n@lists.open-mesh.org Received: from mail-la0-f53.google.com (mail-la0-f53.google.com [209.85.215.53]) by open-mesh.org (Postfix) with ESMTPS id 824156006F3 for ; Wed, 1 Apr 2015 21:35:59 +0200 (CEST) Received: by lahf3 with SMTP id f3so44116985lah.2 for ; Wed, 01 Apr 2015 12:35:58 -0700 (PDT) X-Received: by 10.152.27.97 with SMTP id s1mr18676354lag.53.1427916958753; Wed, 01 Apr 2015 12:35:58 -0700 (PDT) Received: from localhost ([188.163.76.186]) by mx.google.com with ESMTPSA id b7sm606222lak.8.2015.04.01.12.35.57 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Apr 2015 12:35:58 -0700 (PDT) Date: Wed, 1 Apr 2015 22:35:50 +0300 From: Alex Suykov To: Sven Eckelmann Message-ID: <20150401193550.GA24391@vostro> References: <20150401171821.GA21008@vostro> <2646597.jD5Rzrq2qD@sven-desktop> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <2646597.jD5Rzrq2qD@sven-desktop> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: b.a.t.m.a.n@lists.open-mesh.org Subject: Re: [B.A.T.M.A.N.] musl build fixes X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2015 19:35:59 -0000 Wed, Apr 01, 2015 at 07:36:10PM +0200, Sven Eckelmann wrote: > Nacked-by: Sven Eckelmann > > 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. Ah, I see, I wasn't aware packet.h is shared between batctl and the batman kernel module. > 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). It's not that linux headers are not available in musl, they are. The problem is that musl provides its own standalone instead of including , and if both get included at the same time, gcc complains about duplicate definitions. Can you please take a look at the patch below? That is enough to get a musl build, too, and it keeps packet.h intact. In glibc and uclibc at least, includes , so those can be interchanged freely, and batctl already depends on netinet/* headers. With musl, that would break bitwise attribute of course, but only outside of the kernel, and that would be a musl issue anyway. ping.c | 3 ++- tcpdump.c | 1 + tcpdump.h | 2 +- traceroute.c | 3 ++- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ping.c b/ping.c index bdca222..9ec6745 100644 --- a/ping.c +++ b/ping.c @@ -34,7 +34,8 @@ #include #include #include -#include +#include +#include #include "main.h" #include "ping.h" diff --git a/tcpdump.c b/tcpdump.c index b994977..cfeb4cc 100644 --- a/tcpdump.c +++ b/tcpdump.c @@ -43,6 +43,7 @@ #include #include #include +#include #include "tcpdump.h" #include "packet.h" diff --git a/tcpdump.h b/tcpdump.h index 5d936f2..3c9126c 100644 --- a/tcpdump.h +++ b/tcpdump.h @@ -23,7 +23,7 @@ #define _BATCTL_TCPDUMP_H #include -#include +#include #include #include #include "main.h" diff --git a/traceroute.c b/traceroute.c index 4ebfec2..5b58d9d 100644 --- a/traceroute.c +++ b/traceroute.c @@ -22,16 +22,17 @@ #include +#include #include #include #include #include #include #include -#include #include #include #include +#include #include "main.h" #include "traceroute.h"