Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Portability: AF_INET defined elsewhere #8

Open
jimklimov opened this issue Jun 13, 2017 · 1 comment
Open

Portability: AF_INET defined elsewhere #8

jimklimov opened this issue Jun 13, 2017 · 1 comment
Assignees

Comments

@jimklimov
Copy link
Member

Probably a different include-file should be used on this platform (/usr/include/sys/socket.h):

  CXX      src/src_fty_discovery_selftest-fty_discovery_selftest.o
../../../.srcclone/SunOS-i86pc-czmq_3/fty-discovery/src/cidr.cc: In member function 'bool CIDRAddress::set(const sockaddr*)':
../../../.srcclone/SunOS-i86pc-czmq_3/fty-discovery/src/cidr.cc:332:10: error: 'AF_INET' was not declared in this scope
     case AF_INET:
          ^
../../../.srcclone/SunOS-i86pc-czmq_3/fty-discovery/src/cidr.cc:334:10: error: 'AF_INET6' was not declared in this scope
     case AF_INET6:
          ^
gmake[2]: *** [Makefile:1049: src/src_libfty_discovery_la-cidr.lo] Error 1
gmake[2]: Target 'all-am' not remade because of errors.
gmake[2]: Leaving directory '/tmp/FTY/.build/SunOS-i86pc-czmq_3/fty-discovery'
gmake[1]: *** [Makefile:1240: all-recursive] Error 1
gmake[1]: Target 'all' not remade because of errors.
gmake[1]: Leaving directory '/tmp/FTY/.build/SunOS-i86pc-czmq_3/fty-discovery'
@jimklimov jimklimov self-assigned this Jun 13, 2017
@aquette
Copy link
Member

aquette commented Jul 7, 2017

injecting the following snippet in either src/cidr.{cc,h} should fix the issue:

#if !defined(AF_INET)
#if (defined __sun)
#include /usr/include/sys/socket.h
#endif
#endif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants