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 1midC3-0007F0-9d for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Nov 2021 13:54:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1midC1-0000NE-02 for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Nov 2021 13:54:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1midC0-0000N5-Nr for pgsql-hackers@lists.postgresql.org; Thu, 04 Nov 2021 13:54:12 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1midBy-0004M2-DT for pgsql-hackers@lists.postgresql.org; Thu, 04 Nov 2021 13:54:11 +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 1A4Ds7UL319426; Thu, 4 Nov 2021 09:54:07 -0400 From: Tom Lane To: Michael Paquier cc: Thomas Munro , =?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: <461EF47A-C979-4124-87E3-758A68A98D1E@yesql.se> <1790342.1635950136@sss.pgh.pa.us> <20211104105613.d97d4434e1adb2495f428b72@sraoss.co.jp> <284247.1635996826@sss.pgh.pa.us> <284929.1635997526@sss.pgh.pa.us> Comments: In-reply-to Michael Paquier message dated "Thu, 04 Nov 2021 16:38:00 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <319424.1636034047.1@sss.pgh.pa.us> Date: Thu, 04 Nov 2021 09:54:07 -0400 Message-ID: <319425.1636034047@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Michael Paquier writes: > On Wed, Nov 03, 2021 at 11:45:26PM -0400, Tom Lane wrote: >> 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. > Yeah, I don't see how this could be linked to WIN32_LEAN_AND_MEAN. According to that stackoverflow thread, the unwanted #define of X509_NAME comes from , and WIN32_LEAN_AND_MEAN prevents that from being immediately included by . The rough idea I have is that prior to 8162464a2, we sucked in that #define during postgres.h and then OpenSSL's headers were able to undo it. After 8162464a2, we don't read during postgres.h, but some *other* header that be-secure-openssl.c is including after the OpenSSL headers is pulling it in, so that by the time we get to the body of the file the unwanted #define is active. I don't have either the resources or the interest to track down exactly where that happens; my thought was just to make be-secure-openssl.c's inclusions look more like fe-secure-openssl.c. But, if you'd like to pursue the details, feel free. regards, tom lane