]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra/if_netlink: compile under musl-libc
authorArthur Jones <arthur.jones@riverbed.com>
Fri, 9 Mar 2018 23:08:24 +0000 (15:08 -0800)
committerArthur Jones <arthur.jones@riverbed.com>
Fri, 9 Mar 2018 23:20:14 +0000 (15:20 -0800)
musl-libc is a lightweight libc used by alpine linux:

https://www.musl-libc.org/

AFAICT, this is the only change to the source needed to get
basic frr support compiling on musl.

Two changes in one patch, get ethhdr from netinet/if_ether.h
and replace the only __caddr_t I could find in the source base
with caddr_t.

Testing done:

Compiled apk packages using a docker environment (patches
coming soon) also compiled redhat and debian using a similar
docker environment (RFC patches for those changes are queued
up too)...

Issue: https://github.com/FRRouting/frr/issues/1859
Signed-off-by: Arthur Jones <arthur.jones@riverbed.com>
zebra/if_netlink.c

index bb0a0e052e63012bcc26d5478d967b1caa55e329..a37d74416be37fb1ee4430b03bafaecc27677694 100644 (file)
@@ -30,6 +30,7 @@
  */
 #define _LINUX_IN6_H
 
+#include <netinet/if_ether.h>
 #include <linux/if_bridge.h>
 #include <linux/if_link.h>
 #include <net/if_arp.h>
@@ -362,7 +363,7 @@ static int get_iflink_speed(struct interface *interface)
        /* initialize ethtool interface */
        memset(&ecmd, 0, sizeof(ecmd));
        ecmd.cmd = ETHTOOL_GSET; /* ETHTOOL_GLINK */
-       ifdata.ifr_data = (__caddr_t)&ecmd;
+       ifdata.ifr_data = (caddr_t)&ecmd;
 
        /* use ioctl to get IP address of an interface */
        if (zserv_privs.change(ZPRIVS_RAISE))