Re: Missing include <openssl/x509.h> in be-secure-openssl.c?

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>, 近藤雄太 <kondo@sraoss.co.jp>, Daniel Gustafsson <daniel@yesql.se>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, buildfarm@sraoss.co.jp
Date: 2021-11-04T03:33:46Z
Lists: pgsql-hackers
Thomas Munro <thomas.munro@gmail.com> writes:
> Ahh, I think this contains some relevant bits, and we have indeed
> messed around with mentioned Windows headers in master.
> https://stackoverflow.com/questions/49504648/x509-name-macro-in-c-wont-compile/49504794

Oooh .... note the comment there about

    This helped me too, but I found the simplest thing to do was just make sure the OpenSSL headers were #included last in my source file. – 

So the fact that be-secure-openssl.c and fe-secure-openssl.c
are including things in different orders *is* relevant.  I'd
previously discovered this bit in OpenSSL's headers (ossl_typ.h):

# ifdef _WIN32
#  undef X509_NAME
...
#endif
...
typedef struct X509_name_st X509_NAME;

So that will work around the problem as long as it's #include'd
after the relevant Windows headers.

But I don't get the point about where HEAD is different from v14?
be-secure-openssl.c isn't.

			regards, tom lane



Commits

  1. contrib/sslinfo needs a fix too to make hamerkop happy.

  2. Second attempt to silence SSL compile failures on hamerkop.

  3. Blind attempt to silence SSL compile failures on hamerkop.