From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2201) id C05503856DD3; Thu, 28 Apr 2022 13:22:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C05503856DD3 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Jon TURNEY To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin/cygwin-3_3-branch] Cygwin: Fix build with w32api 10.0.0 X-Act-Checkin: newlib-cygwin X-Git-Author: Jon Turney X-Git-Refname: refs/heads/cygwin-3_3-branch X-Git-Oldrev: 086895e81c972358ab31e1709304d677e3a8c7ba X-Git-Newrev: 251c823aba35d3c09e9f8d8942d0b3cea90bf216 Message-Id: <20220428132227.C05503856DD3@sourceware.org> Date: Thu, 28 Apr 2022 13:22:27 +0000 (GMT) X-BeenThere: cygwin-cvs@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component git logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Apr 2022 13:22:27 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D251c823aba3= 5d3c09e9f8d8942d0b3cea90bf216 commit 251c823aba35d3c09e9f8d8942d0b3cea90bf216 Author: Jon Turney Date: Tue Apr 12 11:41:13 2022 +0100 Cygwin: Fix build with w32api 10.0.0 =20 > ../../../../src/winsup/cygwin/sec_auth.cc:1240:16: error: redefinitio= n of =E2=80=98struct _MSV1_0_S4U_LOGON=E2=80=99 > 1240 | typedef struct _MSV1_0_S4U_LOGON > | ^~~~~~~~~~~~~~~~~ > In file included from ../../../../src/winsup/cygwin/ntsecapi.h:10, > from ../../../../src/winsup/cygwin/sec_auth.cc:13: > /usr/include/w32api/ntsecapi.h:1425:18: note: previous definition of = =E2=80=98struct _MSV1_0_S4U_LOGON=E2=80=99 > 1425 | typedef struct _MSV1_0_S4U_LOGON { > | ^~~~~~~~~~~~~~~~~ > ../../../../src/winsup/cygwin/sec_auth.cc:1246:3: error: conflicting = declaration =E2=80=98typedef int MSV1_0_S4U_LOGON=E2=80=99 > 1246 | } MSV1_0_S4U_LOGON, *PMSV1_0_S4U_LOGON; > | ^~~~~~~~~~~~~~~~ > In file included from ../../../../src/winsup/cygwin/ntsecapi.h:10, > from ../../../../src/winsup/cygwin/sec_auth.cc:13: > /usr/include/w32api/ntsecapi.h:1430:5: note: previous declaration as = =E2=80=98typedef struct _MSV1_0_S4U_LOGON MSV1_0_S4U_LOGON=E2=80=99 > 1430 | } MSV1_0_S4U_LOGON, *PMSV1_0_S4U_LOGON; > | ^~~~~~~~~~~~~~~~ > ../../../../src/winsup/cygwin/sec_auth.cc:1246:22: error: conflicting= declaration =E2=80=98typedef int* PMSV1_0_S4U_LOGON=E2=80=99 > 1246 | } MSV1_0_S4U_LOGON, *PMSV1_0_S4U_LOGON; > | ^~~~~~~~~~~~~~~~~ > In file included from ../../../../src/winsup/cygwin/ntsecapi.h:10, > from ../../../../src/winsup/cygwin/sec_auth.cc:13: > /usr/include/w32api/ntsecapi.h:1430:24: note: previous declaration as= =E2=80=98typedef struct _MSV1_0_S4U_LOGON* PMSV1_0_S4U_LOGON=E2=80=99 > 1430 | } MSV1_0_S4U_LOGON, *PMSV1_0_S4U_LOGON; =20 (cherry picked from commit 0b44b06b0544511bc22352dcff95a216f766f582) Diff: --- winsup/cygwin/sec_auth.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/sec_auth.cc b/winsup/cygwin/sec_auth.cc index 83fb39bc5..9559096ee 100644 --- a/winsup/cygwin/sec_auth.cc +++ b/winsup/cygwin/sec_auth.cc @@ -1475,8 +1475,9 @@ out: * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ =20 -/* In Mingw-w64, MsV1_0S4ULogon and MSV1_0_S4U_LOGON are only defined - in ddk/ntifs.h. We can't include this. */ +/* In w32api prior to 10.0.0, MsV1_0S4ULogon and MSV1_0_S4U_LOGON are only + defined in ddk/ntifs.h, which we can't include. */ +#if (__MINGW64_VERSION_MAJOR < 10) =20 #define MsV1_0S4ULogon ((MSV1_0_LOGON_SUBMIT_TYPE) 12) =20 @@ -1491,6 +1492,8 @@ typedef struct _MSV1_0_S4U_LOGON /* Missing in Mingw-w64 */ #define KERB_S4U_LOGON_FLAG_IDENTITY 0x08 =20 +#endif + /* If logon is true we need an impersonation token. Otherwise we just need an identification token, e. g. to fetch the group list. */ HANDLE