joyent/libuv — pull request #437 by mcavage (2012-05-31 15:39:16+00:00)
Title: Support uv_interface_addresses on SunOS

Hello,

The Node.js `require('os').networkInterfaces()` is broken on Illumos (i.e., Solaris), and digging into the code, it's all there, but was #ifdef'd out, presumably because it was unclear if `getifaddrs` was available. `getifadds` is available on Illumos platforms (it seems it has been since late OpenSolaris days). This PR simply #ifdef's out that code. Running from node on smartos now spits out:

```
console.log(JSON.stringify(os.networkInterfaces(), null, 4))
{
"lo0": [
{
"address": "127.0.0.1",
"family": "IPv4",
"internal": true
},
{
"address": "::1",
"family": "IPv6",
"internal": true
}
],
"net0": [
{
"address": "10.88.88.130",
"family": "IPv4",
"internal": false
}
]
}
```