Merge pull request #117 from bluca/solaris_fixes

Problem: build broken on Solaris 10
This commit is contained in:
Constantin Rack 2016-04-13 22:56:53 +02:00
commit dd077bc2b2
5 changed files with 7 additions and 5 deletions

2
NEWS
View File

@ -19,6 +19,8 @@
* Fixed #1887 - zmq_bind IPv4 fallback still tries IPv6 * Fixed #1887 - zmq_bind IPv4 fallback still tries IPv6
* Fixed #1866 - fails to build on SunOS 5.10 / Solaris 10
0MQ version 4.1.4 stable, released on 2015/12/18 0MQ version 4.1.4 stable, released on 2015/12/18
================================================ ================================================

View File

@ -182,8 +182,6 @@ case "${host_os}" in
if test "x$solaris_has_atomic" = "xno"; then if test "x$solaris_has_atomic" = "xno"; then
AC_DEFINE(ZMQ_FORCE_MUTEXES, 1, [Force to use mutexes]) AC_DEFINE(ZMQ_FORCE_MUTEXES, 1, [Force to use mutexes])
fi fi
# ssp library is required for libsodium on Solaris-like systems
LDFLAGS="-lssp $LDFLAGS"
CPPFLAGS="$CPPFLAGS -Wno-long-long" CPPFLAGS="$CPPFLAGS -Wno-long-long"
;; ;;
*freebsd*) *freebsd*)
@ -419,6 +417,8 @@ elif test "x$with_libsodium" = "xyes"; then
case "${host_os}" in case "${host_os}" in
*solaris*) *solaris*)
LDFLAGS="-lssp $LDFLAGS" LDFLAGS="-lssp $LDFLAGS"
libzmq_pedantic="no"
libzmq_werror="no"
;; ;;
esac esac
else else

View File

@ -86,7 +86,7 @@ int zmq::tcp_address_t::resolve_nic_name (const char *nic_, bool ipv6_, bool is_
// Find the interface with the specified name and AF_INET family. // Find the interface with the specified name and AF_INET family.
bool found = false; bool found = false;
lifreq *ifrp = ifc.lifc_req; lifreq *ifrp = ifc.lifc_req;
for (int n = 0; n < (int) (ifc.lifc_len / sizeof lifreq); for (int n = 0; n < (int) (ifc.lifc_len / sizeof (lifreq));
n ++, ifrp ++) { n ++, ifrp ++) {
if (!strcmp (nic_, ifrp->lifr_name)) { if (!strcmp (nic_, ifrp->lifr_name)) {
rc = ioctl (fd, SIOCGLIFADDR, (char*) ifrp); rc = ioctl (fd, SIOCGLIFADDR, (char*) ifrp);

View File

@ -11,7 +11,7 @@ Public domain.
Disable warnings for this source only, rather than for the whole Disable warnings for this source only, rather than for the whole
codebase when building with C99 or with Microsoft's compiler codebase when building with C99 or with Microsoft's compiler
*/ */
#if defined __GNUC__ && __STDC_VERSION__ < 201112L #if defined __GNUC__ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)) && __STDC_VERSION__ < 201112L
# pragma GCC diagnostic ignored "-Wsign-compare" # pragma GCC diagnostic ignored "-Wsign-compare"
#elif defined _MSC_VER #elif defined _MSC_VER
# pragma warning (disable:4018 4244 4146) # pragma warning (disable:4018 4244 4146)

View File

@ -5,7 +5,7 @@
Disable warnings for this source only, rather than for the whole Disable warnings for this source only, rather than for the whole
codebase when building with C99 or with Microsoft's compiler codebase when building with C99 or with Microsoft's compiler
*/ */
#if defined __GNUC__ && __STDC_VERSION__ < 201112L #if defined __GNUC__ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)) && __STDC_VERSION__ < 201112L
# pragma GCC diagnostic ignored "-Wsign-compare" # pragma GCC diagnostic ignored "-Wsign-compare"
#elif defined _MSC_VER #elif defined _MSC_VER
# pragma warning (disable:4018 4244 4146) # pragma warning (disable:4018 4244 4146)