Re: Missing include in be-secure-openssl.c? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Missing include in be-secure-openssl.c?
Date
Msg-id 284929.1635997526@sss.pgh.pa.us
Whole thread Raw
In response to Re: Missing include in be-secure-openssl.c?  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: Missing include in be-secure-openssl.c?
List pgsql-hackers
Thomas Munro <thomas.munro@gmail.com> writes:
> On Thu, Nov 4, 2021 at 4:33 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> But I don't get the point about where HEAD is different from v14?
>> be-secure-openssl.c isn't.

> I don't understand what's going on and I don't have the headers to
> look at, but I was thinking that WIN32_LEAN_AND_MEAN must be causing a
> different state to be reached that somehow leaves the bad definition
> of X509_NAME in place.  It's confusing though, because you'd hope
> that'd cause *less* stuff to get defined...

Yeah, I noted the comment about WIN32_LEAN_AND_MEAN in the
stackoverflow thread too ... but as you say, it seems like
that should make the problem less probable not more so.
Still, it's hard to think of any other relevant change.

Anyway, my thought now is (1) move the openssl includes to
after system includes in both *-secure-openssl.c files,
and (2) add comments explaining why the order is critical.
But it's late here and I'm not going to mess with it right now.
If you want to take a shot at a blind fix before hamerkop's
next run, have at it.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Missing include in be-secure-openssl.c?
Next
From: Bharath Rupireddy
Date:
Subject: Re: enhance pg_log_backend_memory_contexts() to log memory contexts of auxiliary processes