|
Message-ID: <20160303101005.GJ29662@port70.net> Date: Thu, 3 Mar 2016 11:10:06 +0100 From: Szabolcs Nagy <nsz@...t70.net> To: musl@...ts.openwall.com Subject: Re: iproute2 & other software * Rich Felker <dalias@...c.org> [2016-03-02 18:30:50 -0500]: > On Wed, Mar 02, 2016 at 09:49:41PM +0100, Szabolcs Nagy wrote: > > * Loganaden Velvindron <loganaden@...il.com> [2016-03-02 19:19:13 +0000]: > > > " > > > Sorry, I have to reject this. > > > All include files in include/linux come from headers automatically > > > generated from upstream > > > Linux source. This is the only way to ensure long term ABI/API consistency > > > with kernel. > > > > > > Either fix musl or submit patches to upstream kernel and get them merged. > > > " > > > > > > Can we look into providing somekind of compatibility layer for header files > > > so that it's easier to get upstream projects like iproute2 to support musl ? > > > > > > > in theory the correct solution is to fix the kernel headers > > so they don't collide with posix types in libc headers. > > > > in practice old kernel headers should work too and it's unlikely > > that a complete uapi fix would be accepted into linux any time > > soon so applications should avoid including both libc and kernel > > headers into the same tu. > > > > unfortunately glibc added workarounds into libc and uapi headers > > that make it seem as if mixing linux and libc headers work, so > > now application programmers don't have the incentive to fix this. > > > > musl cannot use the same workarounds because they use ifdef __GLIBC__ > > (which is a major bug for linux uapi headers to depend on): > > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/libc-compat.h > > Would it help for us to define the __UAPI_DEF_* macros? If so I'd be no, because they are defined unconditionally in libc-compat.h, however we could define _UAPI_LIBC_COMPAT_H to make the conflicting type definitions disappear. but that is still fragile: any libc header would disable all typedefs, while in glibc the checks are more fine grained. we could also submit a linux patch to make the non-__GLIBC__ case more reasonable (e.g. check for existing definition of the macros). > happy to look at a patch doing that. I don't think we should honor > them for suppressing definitions in libc (i.e. for supporting > inclusion of uapi headers _before_ libc ones) but it seems like we > could support inclusion of the uapi headers _after_ libc ones by doing > this with very little effort or maintenance cost. > > Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.