#419 Solaris 10 doesn't have "ifaddrs.h"

Reporter jcea@jcea.es
Owner MattJ
Stars ★★ (2)
  • Status-Accepted
  • OpSys-Solaris
  • Type-Defect
  • Priority-Medium
  • util.net
  1. jcea@jcea.es on

    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 "" 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".

  2. 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.

    • owner MattJ
    • tags Status-Accepted
  3. 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".

  4. 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.

    • tags Milestone-0.9
  5. jcea@jcea.es on

    What is the impact of returning "" (like Windows version does) instead of the real list of interfaces (the unixes)?

  6. Zash on

    Does https://hg.prosody.im/0.9/rev/63f5870f9afe help with this issue?

  7. Zash on

    • tags util.net
  8. Zash on

    • tags OpSys-Solaris
  9. Zash on

    No patches were received. Dropping milestone. Maybe even close this if the affected OS goes out of support in a couple of months?

    • tags Milestone-0.9

New comment

Not published. Used for spam prevention and optional update notifications.