From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexei Starovoitov Subject: Re: [RFC/fix] Re: libbpf build broken on musl libc (Alpine Linux) Date: Mon, 17 Sep 2018 21:18:00 -0700 Message-ID: <20180918041758.rruwsw52jxpxh6bk@ast-mbp> References: <20180910172903.GB15516@kernel.org> <20180911122218.0d2eb3f9@cakuba> <20180911121543.GB22689@kernel.org> <20180911212451.hvnyfwyvcs4yojqy@ast-mbp> <20180913183240.GF30969@kernel.org> <20180913185629.su22fnimluoezntg@ast-mbp> <20180917151636.GA21790@kernel.org> <20180918005256.7uutwda4s3ofoxpd@ast-mbp> <20180917193952.6709fd1b@cakuba.netronome.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Arnaldo Carvalho de Melo , Daniel Borkmann , Thomas Richter , Hendrik Brueckner , Jiri Olsa , Namhyung Kim , linux-kernel@vger.kernel.org, netdev@vger.kernel.org To: Jakub Kicinski Return-path: Content-Disposition: inline In-Reply-To: <20180917193952.6709fd1b@cakuba.netronome.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Mon, Sep 17, 2018 at 07:39:52PM -0700, Jakub Kicinski wrote: > On Mon, 17 Sep 2018 17:52:59 -0700, Alexei Starovoitov wrote: > > LGPL-2.1 in the above? > > Could we possibly make it dual licensed LGPL + BSD? that's a separate discussion. let's not mix it up with this fix. > > The rest looks good to me. > > Should we take it via bpf-next tree? > > If you feel there is an urgency to fix musl build, we can take it via > > bpf tree too. > > > > Jakub, thoughts? you've been messing with strerror last.. > > Sorry for the mess, I didn't know libc compat is such a pain. > > I kind of knowingly ignored the existing str_error_r(), as it didn't > seem excessively clean. Yet, two months later I have no better > ideas.. We could as well switch back to the XSI version, which we used > before I needed access to reallocarray() (I mean change the str_error() > to be a plain XSI wrapper). > > Perhaps placing the new helper in libbpf_errno.c file would make > sense? The only reason for this separate file to exist is in fact to > make use of XSI-compliant strerror_r(). that's a good idea. libbpf_errno.c sounds more appropriate to me as well. > Also, I need to go relicense tools/include/tools/libc_compat.h ASAP > too :S argh. an oversight. pls send the patch.