diff --git a/NEWS b/NEWS index 11f6dcb0..8184cc97 100644 --- a/NEWS +++ b/NEWS @@ -19,6 +19,8 @@ * 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 ================================================ diff --git a/configure.ac b/configure.ac index ecc3c0a3..42cf00b4 100644 --- a/configure.ac +++ b/configure.ac @@ -182,8 +182,6 @@ case "${host_os}" in if test "x$solaris_has_atomic" = "xno"; then AC_DEFINE(ZMQ_FORCE_MUTEXES, 1, [Force to use mutexes]) fi - # ssp library is required for libsodium on Solaris-like systems - LDFLAGS="-lssp $LDFLAGS" CPPFLAGS="$CPPFLAGS -Wno-long-long" ;; *freebsd*) @@ -419,6 +417,8 @@ elif test "x$with_libsodium" = "xyes"; then case "${host_os}" in *solaris*) LDFLAGS="-lssp $LDFLAGS" + libzmq_pedantic="no" + libzmq_werror="no" ;; esac else diff --git a/src/tcp_address.cpp b/src/tcp_address.cpp index 0c699e3a..86fa617f 100644 --- a/src/tcp_address.cpp +++ b/src/tcp_address.cpp @@ -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. bool found = false; 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 ++) { if (!strcmp (nic_, ifrp->lifr_name)) { rc = ioctl (fd, SIOCGLIFADDR, (char*) ifrp); diff --git a/tweetnacl/contrib/randombytes/randombytes.h b/tweetnacl/contrib/randombytes/randombytes.h index d724f4a2..68407d3e 100644 --- a/tweetnacl/contrib/randombytes/randombytes.h +++ b/tweetnacl/contrib/randombytes/randombytes.h @@ -11,7 +11,7 @@ Public domain. Disable warnings for this source only, rather than for the whole 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" #elif defined _MSC_VER # pragma warning (disable:4018 4244 4146) diff --git a/tweetnacl/src/tweetnacl_base.h b/tweetnacl/src/tweetnacl_base.h index 42b99726..7d38af8f 100644 --- a/tweetnacl/src/tweetnacl_base.h +++ b/tweetnacl/src/tweetnacl_base.h @@ -5,7 +5,7 @@ Disable warnings for this source only, rather than for the whole 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" #elif defined _MSC_VER # pragma warning (disable:4018 4244 4146)