pgsql: Fix building with LibreSSL.

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix building with LibreSSL.
Date: 2016-09-15 19:54:36
Message-ID: E1bkck0-0000Q1-It@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix building with LibreSSL.

LibreSSL defines OPENSSL_VERSION_NUMBER to claim that it is version 2.0.0,
but it doesn't have the functions added in OpenSSL 1.1.0. Add autoconf
checks for the individual functions we need, and stop relying on
OPENSSL_VERSION_NUMBER.

Backport to 9.5 and 9.6, like the patch that broke this. In the
back-branches, there are still a few OPENSSL_VERSION_NUMBER checks left,
to check for OpenSSL 0.9.8 or 0.9.7. I left them as they were - LibreSSL
has all those functions, so they work as intended.

Per buildfarm member curculio.

Discussion: <2442(dot)1473957669(at)sss(dot)pgh(dot)pa(dot)us>

Branch
------
REL9_6_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/9895818d5656e3fe775af05df3e2b2cce7346962

Modified Files
--------------
configure | 31 +++++++++++++++++++++++++++++++
configure.in | 10 ++++++++++
contrib/pgcrypto/openssl.c | 10 ++++++----
src/backend/libpq/be-secure-openssl.c | 6 +++---
src/include/pg_config.h.in | 18 ++++++++++++++++++
src/interfaces/libpq/fe-secure-openssl.c | 31 +++++++++++++++++--------------
6 files changed, 85 insertions(+), 21 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2016-09-15 22:18:39 pgsql: Clarify policy on marking inherited constraints as valid.
Previous Message Heikki Linnakangas 2016-09-15 17:21:56 Re: [COMMITTERS] pgsql: Support OpenSSL 1.1.0.