From: joeyh Date: Mon, 25 Jun 2007 17:06:51 +0000 (+0000) Subject: * Patch from Sergej Pupykin fixing ifdata -pN. X-Git-Tag: 0.21~1 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63b55e43fde7f4ee84a6432c98ef0fad932f468e;p=moreutils * Patch from Sergej Pupykin fixing ifdata -pN. --- diff --git a/debian/changelog b/debian/changelog index c245223..6db7dfc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +moreutils (0.21) UNRELEASED; urgency=low + + * Patch from Sergej Pupykin fixing ifdata -pN. + + -- Joey Hess Mon, 25 Jun 2007 13:06:21 -0400 + moreutils (0.20) unstable; urgency=low * Typo fixes from Ralf Wildenhues. diff --git a/ifdata.c b/ifdata.c index 2fd4b51..f8fa024 100644 --- a/ifdata.c +++ b/ifdata.c @@ -193,7 +193,7 @@ struct sockaddr *if_bcast(const char *iface, struct ifreq *r) { struct sockaddr *if_network(const char *iface) { struct sockaddr *saddr; - struct ifreq req; + static struct ifreq req; unsigned int mask; if (!(saddr = if_mask(iface, &req))) @@ -209,7 +209,7 @@ struct sockaddr *if_network(const char *iface) { } int if_mtu(const char *iface) { - struct ifreq req; + static struct ifreq req; if (do_socket_ioctl(iface, SIOCGIFMTU, &req, NULL, PRINT_ERROR)) return 0; @@ -343,7 +343,7 @@ struct if_stat *ifstats, *ifstats2 = NULL; void please_do(int ndo, int *todo, const char *ifname) { int i; - struct ifreq req; + static struct ifreq req; if (!ndo) return; // printf("I have %d items in my queue.\n",ndo); for (i=0; i