Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1miTVk-0003Jj-JD for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Nov 2021 03:33:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1miTVj-0004EH-CW for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Nov 2021 03:33:55 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1miTVj-0004E7-3j for pgsql-hackers@lists.postgresql.org; Thu, 04 Nov 2021 03:33:55 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1miTVf-0000Hz-V9 for pgsql-hackers@lists.postgresql.org; Thu, 04 Nov 2021 03:33:54 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 1A43Xka6284248; Wed, 3 Nov 2021 23:33:46 -0400 From: Tom Lane To: Thomas Munro cc: Michael Paquier , =?UTF-8?B?6L+R6Jek6ZuE5aSq?= , Daniel Gustafsson , PostgreSQL Hackers , buildfarm@sraoss.co.jp Subject: Re: Missing include in be-secure-openssl.c? In-reply-to: References: <1051867.1635720347@sss.pgh.pa.us> <3C44D869-9BA5-4D02-9812-BF85D105B315@yesql.se> <1129759.1635773615@sss.pgh.pa.us> <461EF47A-C979-4124-87E3-758A68A98D1E@yesql.se> <1790342.1635950136@sss.pgh.pa.us> <20211104105613.d97d4434e1adb2495f428b72@sraoss.co.jp> Comments: In-reply-to Thomas Munro message dated "Thu, 04 Nov 2021 15:56:40 +1300" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <284246.1635996826.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 03 Nov 2021 23:33:46 -0400 Message-ID: <284247.1635996826@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Thomas Munro 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-c= ompile/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. =E2=80=93= = 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