Skip to content
  • Thomas Haller's avatar
    build: avoid header conflict for <linux/if.h> and <net/if.h> with "nm-platform.h" · 37e47fbd
    Thomas Haller authored
    In the past, the headers "linux/if.h" and "net/if.h" were incompatible.
    That means, we can either include one or the other, but not both.
    This is fixed in the meantime, however the issue still exists when
    building against older kernel/glibc.
    
    That means, including one of these headers from a header file
    is problematic. In particular if it's a header like "nm-platform.h",
    which itself is dragged in by many other headers.
    
    Avoid that by not including these headers from "platform.h", but instead
    from the source files where needed (or possibly from less popular header
    files).
    
    Currently there is no problem. However, this allows an unknowing user to
    include <net/if.h> at the same time with "nm-platform.h", which is easy
    to get wrong.
    37e47fbd