[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJ0EP43TXU7U54+hxouCcKZ+GYVMOsM4aVXuoQ2kFtN2Whs0nw@mail.gmail.com>
Date: Sun, 4 Aug 2024 13:07:54 -0400
From: Mike Gilbert <floppym@...too.org>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: Andreas K. Hüttel <dilfridge@...too.org>,
netdev@...r.kernel.org, base-system@...too.org
Subject: Re: [PATCH v2 iproute2] libnetlink.h: Include <endian.h> explicitly
for musl
On Sun, Aug 4, 2024 at 12:58 PM Stephen Hemminger
<stephen@...workplumber.org> wrote:
>
> On Sun, 4 Aug 2024 18:03:23 +0200
> Andreas K. Hüttel <dilfridge@...too.org> wrote:
>
> > The code added in "f_flower: implement pfcp opts" uses h2be64,
> > defined in endian.h. While this is pulled in around some corners
> > for glibc (see below), that's not the case for musl and an
> > explicit include is required there.
> >
> > . /usr/include/libmnl/libmnl.h
> > .. /usr/include/sys/socket.h
> > ... /usr/include/bits/socket.h
> > .... /usr/include/sys/types.h
> > ..... /usr/include/endian.h
> >
> > Fixes: 976dca372 ("f_flower: implement pfcp opts")
> > Bug: https://bugs.gentoo.org/936234
> > Signed-off-by: Andreas K. Hüttel <dilfridge@...too.org>
>
> Other parts of flower code use htonll().
> It would have been better to be consistent and not use h2be64() at all.
htonl is used for 32-bit numbers. It won't work properly with 64-bit numbers.
Powered by blists - more mailing lists