http://bugs.winehq.org/show_bug.cgi?id=20714
--- Comment #23 from Juan Lang juan_lang@yahoo.com 2010-03-14 21:09:58 --- (In reply to comment #22)
Don't know, but that's not the point of this bug.
Well, it kinda is...
Not really, this is about a specific compile failure. I sent a fix for that. "Cleaner approach" == a different bug.
After all, if SIOCGARP can be used on Linux, there's no need for SIOCGIFHWADDR there, either, for getting the MAC address. And I am 99.999% positive that BSD still supports getting the MAC address via SIOCGARP too. Being well documented by Stevens, it's probably the best choice of least-common-denominator. Then one could work around its absence on specific systems.
Yep. Onus is on you to test it though. When I wrote this code (7 years ago!) I tested it on Solaris, MacOS X server, and various Linuxen. I no longer recall if SIOCGIFHWADDR was needed to cover all the Linux boxes I tried it on, but even it had been, things may have changed.
The benefit? Simpler code, consistent behavior cross-platform (as they'd all be using the same interface), and I'm pretty sure lots of people use Stevens's approach, as it's been around at least 20 years.
Pretty sure ain't the same as tested. I know at least one system (FreeBSD) that doesn't support SIOCGARP. But, I'm following you off topic. Different forum, please.