Solaris 10 doesn't have "ifaddrs.h" neither, of course, "getifaddrs()" function. So, compilation fails.
Checking the source code I see that in Windows you doesn't use "getifaddrs()" funcion and just returns "0.0.0.0" IP address. I wonder about what that means and it would be enough to just do the same under Solaris 10. I could contribute with a patch in that case, detecting Solaris 10 in "configure".
Waqas
on
Thanks for the report!
Solaris 11 adds this function apparently, while Solaris 10 and below do not.
We've had Solaris compatibility patches before, usually with an #ifdef check, e.g.,
> #if !(defined(sun) || defined(__sun))
An expanded check similar to this in util-src/net.c with version detection would be ideal, but I have no idea what macros are defined on Solaris.
Changes
tags Status-Accepted
owner MattJ
jcea@jcea.es
on
Yes, Solaris 11 has this. But Solaris 10 will supported by Oracle until 2021 :-).
There is no macro saying what Solaris version your are compiling in, but it could be done in "configure" (reading "uname" output) or a new target like "./configure ostype=solaris10".
MattJ
on
I like the idea of a new ostype. Marking this for 0.9. Patches welcome :) Otherwise I'll probably get to this when we're preparing the next release.
Changes
tags Milestone-0.9
jcea@jcea.es
on
What is the impact of returning "0.0.0.0" (like Windows version does) instead of the real list of interfaces (the unixes)?
Solaris 10 doesn't have "ifaddrs.h" neither, of course, "getifaddrs()" function. So, compilation fails. Checking the source code I see that in Windows you doesn't use "getifaddrs()" funcion and just returns "0.0.0.0" IP address. I wonder about what that means and it would be enough to just do the same under Solaris 10. I could contribute with a patch in that case, detecting Solaris 10 in "configure".
Thanks for the report! Solaris 11 adds this function apparently, while Solaris 10 and below do not. We've had Solaris compatibility patches before, usually with an #ifdef check, e.g., > #if !(defined(sun) || defined(__sun)) An expanded check similar to this in util-src/net.c with version detection would be ideal, but I have no idea what macros are defined on Solaris.
ChangesYes, Solaris 11 has this. But Solaris 10 will supported by Oracle until 2021 :-). There is no macro saying what Solaris version your are compiling in, but it could be done in "configure" (reading "uname" output) or a new target like "./configure ostype=solaris10".
I like the idea of a new ostype. Marking this for 0.9. Patches welcome :) Otherwise I'll probably get to this when we're preparing the next release.
ChangesWhat is the impact of returning "0.0.0.0" (like Windows version does) instead of the real list of interfaces (the unixes)?
Does https://hg.prosody.im/0.9/rev/63f5870f9afe help with this issue?
No patches were received. Dropping milestone. Maybe even close this if the affected OS goes out of support in a couple of months?
ChangesMilestone-0.9Crickets. Closing.
Changes