summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoeyh <joeyh>2007-06-25 17:06:51 +0000
committerjoeyh <joeyh>2007-06-25 17:06:51 +0000
commit63b55e43fde7f4ee84a6432c98ef0fad932f468e (patch)
tree46d2d29728296ed2e39fda05da48b99b7e55d9d8
parentf9c026a0b72eb7161c612ee62fabea5edbaec419 (diff)
downloadmoreutils-63b55e43fde7f4ee84a6432c98ef0fad932f468e.tar.gz
* Patch from Sergej Pupykin fixing ifdata -pN.
-rw-r--r--debian/changelog6
-rw-r--r--ifdata.c6
2 files changed, 9 insertions, 3 deletions
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 <joeyh@debian.org> 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<ndo; i++) {