It's been a while since I've had access to a Mac OS X machine and cycles to spend on compatibility work, so please forgive my delayed reponse!
I understand the desire to split up patch 0005 into something more digestible, but I'm not sure I fully understand your suggestion on how to do it. Where should that local variable be introduced, and which counter within the `for' clause should it replace? In case it's faster for you to look at source code, here's my attempt at the "preparation" patch:
@@ -451,9 +451,11 @@
int numreqs = 16;
+ size_t iflen = sizeof (struct ifreq);
struct ifconf ifc;
- struct ifreq *ifr;
struct ifreq ifr2;
@@ -502,9 +504,10 @@ collect (void)
- ifr = ifc.ifc_req;
- for (n = 0; n < ifc.ifc_len; n += sizeof (struct ifreq), ifr++)
+ for (n = 0; n < ifc.ifc_len; n += iflen)
+ struct ifreq *ifr = ifc.ifc_req + n;
Does that get at what you were talking about? If so, great! I'll package it up into a real patch. If not, can you lead me through it a bit more explicitly?