wrong/old files in include/linux

Michael Richardson mcr at sandelman.ca
Tue Sep 23 07:27:48 PDT 2014


Thomas Graf <tgraf at suug.ch> wrote:
    >> Under include/linux, we have:
    >> %ls include/linux
    >> can/         if_addr.h    if_link.h    ipv6.h       netlink.h    snmp.h
    >> fib_rules.h  if_arp.h     if_vlan.h    neighbour.h  pkt_cls.h    tc_act/
    >> gen_stats.h  if_bridge.h  ip.h         netfilter/   pkt_sched.h  tc_ematch/
    >> genetlink.h  if_ether.h   ip_mp_alg.h  netfilter.h  rtnetlink.h
    >>
    >> These are mostly bad/poor copies of files from /usr/include.
    >> I appreciate that perhaps they are necessary in some places in order to build
    >> properly, but I wonder if could be in another directory, -I added for just
    >> that situation?  Maybe they don't need to exist at all?
    >>
    >> This is the only thing that keeps me from building against in-tree libnl.
    >> The -Iblahblah/libnl/include finds the incomplete if.h (which I've deleted
    >> locally above), rather than the one from my exported kernel /usr/include.

    > The reason these copies exist is because libnl frequently receives
    > support for recent new kernel features and the glibc headers take
    > a while to be updated. Some of the copies can probably be removed at

Yes, this makes sense.

    > this point but it is difficult to figure out which as it might break
    > builds that are currently functionality.

    > Can you provide the compile error/warning? I thought we fixed the if.h
    > conflict.

if.h was missing lots of things, such as the ifreq definition.
This affects programs built against libnl, with libnl's include directory,
particularly in various cross-build environments.

I suggest that the extra kernel includes not go into the main libnl include
directory, but rather into some other directory.  I think I have a patch to
do this, which I can push to github.

--
]               Never tell me the odds!                 | ipv6 mesh networks [
]   Michael Richardson, Sandelman Software Works        | network architect  [
]     mcr at sandelman.ca  http://www.sandelman.ca/        |   ruby on rails    [






More information about the libnl mailing list