From: Pali Rohár Date: Sat, 31 Jul 2021 20:12:55 +0000 (+0200) Subject: pppd: Replace IF_NAMESIZE by IFNAMSIZ for struct ifreq X-Git-Tag: ppp-2.5.0~60^2 X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=commitdiff_plain;h=d2858ab22a536c8e58f7796b2947f5ff72bb4450 pppd: Replace IF_NAMESIZE by IFNAMSIZ for struct ifreq Macros IF_NAMESIZE and IFNAMSIZ should be defined to the same value, but struct ifreq uses IFNAMSIZ. So use "correct" macro. Signed-off-by: Pali Rohár --- diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c index c68dbe1..e1bb810 100644 --- a/pppd/sys-linux.c +++ b/pppd/sys-linux.c @@ -700,8 +700,8 @@ static int make_ppp_unit(void) char t[IFNAMSIZ]; memset(&ifr, 0, sizeof(struct ifreq)); slprintf(t, sizeof(t), "%s%d", PPP_DRV_NAME, ifunit); - strlcpy(ifr.ifr_name, t, IF_NAMESIZE); - strlcpy(ifr.ifr_newname, req_ifname, IF_NAMESIZE); + strlcpy(ifr.ifr_name, t, IFNAMSIZ); + strlcpy(ifr.ifr_newname, req_ifname, IFNAMSIZ); x = ioctl(sock_fd, SIOCSIFNAME, &ifr); if (x < 0) error("Couldn't rename interface %s to %s: %m", t, req_ifname);