[acassen/keepalived] 947248: Fix build with Linux kernel headers v4.15

Quentin Armitage <[email protected]> Mon, 12 Feb 2018 06:50:52 -0800
Newsgroups gmane.linux.keepalived.devel
Message-ID <5a81a9cc312bc_444c2adaeb1c1c0438312@hookshot-fe-5a11256.cp1-iad.github.net.mail>
  Branch: refs/heads/master
  Home:   https://github.com/acassen/keepalived
  Commit: 947248af144bcab6376ccddab8dc40f313b14281
      https://github.com/acassen/keepalived/commit/947248af144bcab6376ccddab8dc40f313b14281
  Author: Baruch Siach <[email protected]>
  Date:   2018-02-09 (Fri, 09 Feb 2018)

  Changed paths:
    M keepalived/include/vrrp_arp.h
    M keepalived/vrrp/vrrp.c

  Log Message:
  -----------
  Fix build with Linux kernel headers v4.15

Linux kernel version 4.15 changed the libc/kernel headers suppression
logic in a way that introduces collisions:

In file included from ./../include/vrrp_ipaddress.h:32:0,
           from ./../include/vrrp_arp.h:31,
           from vrrp.c:29:
/home/peko/autobuild/instance-1/output/host/arc-buildroot-linux-uclibc/sysroot/usr/include/linux/in.h:29:3: error: redeclaration of enumerator 'IPPROTO_IP'
   IPPROTO_IP = 0,  /* Dummy protocol for TCP  */
   ^
/home/peko/autobuild/instance-1/output/host/arc-buildroot-linux-uclibc/sysroot/usr/include/netinet/in.h:33:5: note: previous definition of 'IPPROTO_IP' was here
     IPPROTO_IP = 0,    /* Dummy protocol for TCP.  */
     ^~~~~~~~~~

Include the libc netinet/in.h header first to suppress the kernel
header.

In addition, add _GNU_SOURCE to vrrp.c for the libc provided in6_pktinfo
definition.

Signed-off-by: Baruch Siach <[email protected]>


  Commit: a5457d3a1f579fef5825ffe841f1613b0014ff19
      https://github.com/acassen/keepalived/commit/a5457d3a1f579fef5825ffe841f1613b0014ff19
  Author: Quentin Armitage <[email protected]>
  Date:   2018-02-12 (Mon, 12 Feb 2018)

  Changed paths:
    M keepalived/include/vrrp_arp.h
    M keepalived/vrrp/vrrp.c

  Log Message:
  -----------
  Merge pull request #777 from baruchsiach/fix-kernel-net-headers

Fix build with Linux kernel headers v4.15


Compare: https://github.com/acassen/keepalived/compare/eda42c75013f...a5457d3a1f57

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
Keepalived-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/keepalived-devel