From: James Carlson Date: Wed, 30 Dec 2020 14:55:12 +0000 (-0500) Subject: Repair compilation issues on Solaris X-Git-Tag: ppp-2.4.9~9 X-Git-Url: https://git.ozlabs.org/?a=commitdiff_plain;h=7ce9cb7b5313db7d354fbeabb87deaf6d5cd6aa2;hp=952cfa5acc41ad4ceee160420a188a388bb340cf;p=ppp.git Repair compilation issues on Solaris There's no "ifr_mtu" on the legacy BSD interface; it's "ifr_metric" and old K&R style implied 'int' can't be used with modern function declarations. Signed-off-by: Paul Mackerras --- diff --git a/pppd/sys-solaris.c b/pppd/sys-solaris.c index e0cd0be..58ad21a 100644 --- a/pppd/sys-solaris.c +++ b/pppd/sys-solaris.c @@ -258,7 +258,7 @@ static int get_hw_addr(char *, u_int32_t, struct sockaddr *); static int get_hw_addr_dlpi(char *, struct sockaddr *); static int dlpi_attach(int, int); static int dlpi_info_req(int); -static int dlpi_get_reply(int, union DL_primitives *, int, int); +static int dlpi_get_reply(int, union DL_primitives *, int, size_t); static int strioctl(int, int, void *, int, int); #ifdef SOL2 @@ -1499,7 +1499,7 @@ netif_get_mtu(int unit) error("ioctl(SIOCGIFMTU): %m (line %d)", __LINE__); return 0; } - return ifr.ifr_mtu; + return ifr.ifr_metric; } /* @@ -2315,7 +2315,7 @@ dlpi_info_req(int fd) } static int -dlpi_get_reply(int fd, union DL_primitives *reply, int expected_prim, maxlen) +dlpi_get_reply(int fd, union DL_primitives *reply, int expected_prim, size_t maxlen) { struct strbuf buf; int flags, n;