diff --git a/NEWS b/NEWS index 4f730a65..46121cd7 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,8 @@ What's new in psycopg 2.4.7 --------------------------- - Properly cleanup memory of broken connections (ticket #142). + - Fixed build on Solaris 10 and 11 where the round() function is already + declared (:ticket:`#146`). - Fixed bad interaction of setup.py with other dependencies in Distribute project on Python 3 (ticket #153). diff --git a/psycopg/config.h b/psycopg/config.h index f3094493..45157709 100644 --- a/psycopg/config.h +++ b/psycopg/config.h @@ -141,7 +141,10 @@ static int pthread_mutex_init(pthread_mutex_t *mutex, void* fake) #endif #endif -#if (defined(__FreeBSD__) && __FreeBSD_version < 503000) || (defined(_WIN32) && !defined(__GNUC__)) || defined(__sun__) || defined(sun) +#if (defined(__FreeBSD__) && __FreeBSD_version < 503000) \ + || (defined(_WIN32) && !defined(__GNUC__)) \ + || (defined(sun) || defined(__sun__)) \ + && (defined(__SunOS_5_8) || defined(__SunOS_5_9)) /* what's this, we have no round function either? */ static double round(double num) {