Archived

This forum has been archived. Please start a new discussion on GitHub.

Build error on Red Hat Linux (kernel:2.4.18)

It failed and report:
Network.cpp:17:23: ifaddrs.h: No such file or directory.

This is the code:
#if defined(_WIN32)
#  include <winsock2.h>
#elif defined(__linux) || defined(__APPLE__) || defined(__FreeBSD__)
#  include <ifaddrs.h>
#else
#  include <sys/ioctl.h>
#  include <net/if.h>
#  ifdef __sun
#    include <sys/sockio.h>
#  endif
#endif

I can not find the "ifaddrs.h" file on my RH Linux.

Thanks!

Comments

  • matthew
    matthew NL, Canada
    What version of Red Hat are you trying to build Ice on?
  • Red Hat Release 7.3 (Valhalla)
  • matthew
    matthew NL, Canada
    Note that we do not officially support RedHat 7.3. If you need this support for a commercial project please contact us at sales@zeroc.com and we can provide you a patch. Otherwise, it shouldn't be too difficult to do this yourself.

    Apparently, getifaddrs was added to RedHat after 7.3. This is needed to implement IceInternal::getLocalHosts (src/Ice/Network.cpp). You can probably use the alternative implementation that uses SIOCGIFCONF.