diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2018-09-05 16:36:58 +0100 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2018-09-05 16:36:58 +0100 |
commit | 0bea06f51375e9781b27d67436a0b42b69a62e02 (patch) | |
tree | 8d0de0a4a80cfe4d28b7ca6df781e8205c3bc076 | |
parent | 3cdc0bc6e5e6b8761e49349ae75ab0349fd7301c (diff) | |
download | psycopg2-fix-bsd-version.tar.gz |
Import params.h on FreeBSD if needed to establish versionfix-bsd-version
Fix #755
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | psycopg/config.h | 5 |
2 files changed, 6 insertions, 0 deletions
@@ -6,6 +6,7 @@ What's new in psycopg 2.7.6 - Close named cursors if exist, even if `~cursor.execute()` wasn't called (:ticket:`#746`). +- Fixed building on modern FreeBSD versions with Python 3.7 (:ticket:`#755`) What's new in psycopg 2.7.5 diff --git a/psycopg/config.h b/psycopg/config.h index a96864f..780bb97 100644 --- a/psycopg/config.h +++ b/psycopg/config.h @@ -153,6 +153,11 @@ typedef unsigned __int64 uint64_t; #include "win32_support.h" #endif +/* Use params.h for __FreeBSD_version (only needed from a certain version on) */ +#if defined(__FreeBSD__) && !defined(__FreeBSD_version) +#include <sys/param.h> +#endif + /* what's this, we have no round function either? */ #if (defined(__FreeBSD__) && __FreeBSD_version < 503000) \ || (defined(_WIN32) && !defined(__GNUC__)) \ |