netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yegor Yefremov <yegorslists@googlemail.com>
To: Felix Janda <felix.janda@posteo.de>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	Stephen Hemminger <stephen@networkplumber.org>,
	netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH iproute2] Use PATH_MAX instead of MAXPATHLEN
Date: Tue, 21 Jul 2015 22:40:32 +0200	[thread overview]
Message-ID: <CAGm1_kv3HJpo_Z=T-qxWupuwOU5F2rO8rSr9HEZZONkch5DO9g@mail.gmail.com> (raw)
In-Reply-To: <20150429165205.GA1364@euler>

On Wed, Apr 29, 2015 at 6:52 PM, Felix Janda <felix.janda@posteo.de> wrote:
> Florian Fainelli wrote:
>> On 27/04/15 09:13, Stephen Hemminger wrote:
>> > On Sat, 25 Apr 2015 22:33:28 +0200
>> > Felix Janda <felix.janda@posteo.de> wrote:
>> >
>> >> They are equivalent but the former is more common. PATH_MAX is
>> >> specified by POSIX and needs <limits.h> while MAXPATHLEN has BSD
>> >> origin and needs <sys/param.h>.
>> >>
>> >> PATH_MAX has already been in use in misc/lnstat.h.
>> >>
>> >> Signed-off-by: Felix Janda <felix.janda@posteo.de>
>> >
>> > Iproute2 is intended for use on Linux.
>> > It makes more sense to align with Posix than using leftover
>> > BSD stuff. Therefore I don't see any point in doing this.
>>
>> My reading from Felix's commit message is that he is attempting to do
>> exactly that: conform to POSIX rather than BSD, which seems to be the
>> direction you are also suggesting here.
>> --
>> Florian
>
> This is correct. (In fact I misread the end of Stephen's message,
> thought that the patch was merged and wanted to thank for that.)

What's the status of this patch? This is one of the reasons iproute2
cannot be compiled against musl C library. After fixing this I get
tons of redefine errors:

In file included from ../include/linux/xfrm.h:4:0,
                 from xfrm_state.c:31:
../include/linux/in6.h:32:8: error: redefinition of ‘struct in6_addr’
 struct in6_addr {
        ^
In file included from
/home/user/Documents/versioned/buildroot/output/host/usr/arm-buildroot-linux-musleabi/sysroot/usr/include/netdb.h:9:0,
                 from xfrm_state.c:30:
/home/user/Documents/versioned/buildroot/output/host/usr/arm-buildroot-linux-musleabi/sysroot/usr/include/netinet/in.h:24:8:
note: originally defined here
 struct in6_addr
        ^
In file included from ../include/linux/xfrm.h:4:0,
                 from xfrm_state.c:31:
../include/linux/in6.h:40:0: warning: "s6_addr" redefined
 #define s6_addr   in6_u.u6_addr8
 ^
In file included from
/home/user/Documents/versioned/buildroot/output/host/usr/arm-buildroot-linux-musleabi/sysroot/usr/include/netdb.h:9:0,
                 from xfrm_state.c:30:
/home/user/Documents/versioned/buildroot/output/host/usr/arm-buildroot-linux-musleabi/sysroot/usr/include/netinet/in.h:32:0:
note: this is the location of the previous definition
 #define s6_addr __in6_union.__s6_addr
 ^

Yegor

      reply	other threads:[~2015-07-21 20:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-25 20:33 [PATCH iproute2] Use PATH_MAX instead of MAXPATHLEN Felix Janda
2015-04-27 16:13 ` Stephen Hemminger
2015-04-28 22:47   ` Florian Fainelli
2015-04-29 16:52     ` Felix Janda
2015-07-21 20:40       ` Yegor Yefremov [this message]

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='CAGm1_kv3HJpo_Z=T-qxWupuwOU5F2rO8rSr9HEZZONkch5DO9g@mail.gmail.com' \
    --to=yegorslists@googlemail.com \
    --cc=f.fainelli@gmail.com \
    --cc=felix.janda@posteo.de \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.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;
as well as URLs for NNTP newsgroup(s).