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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, 近藤雄太 <kondo(at)sraoss(dot)co(dot)jp>, Daniel Gustafsson <daniel(at)yesql(dot)se>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, buildfarm(at)sraoss(dot)co(dot)jp
Subject: Re: Missing include <openssl/x509.h> in be-secure-openssl.c?
Date: 2021-11-04 03:33:46
Message-ID: 284247.1635996826@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thomas Munro <thomas(dot)munro(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2021-11-04 03:37:47 Re: Missing include <openssl/x509.h> in be-secure-openssl.c?
Previous Message houzj.fnst@fujitsu.com 2021-11-04 03:21:36 RE: row filtering for logical replication