From 245dfb801ebb9d3d3cd857d64c17b36c82b86939 Mon Sep 17 00:00:00 2001 From: Gerald Pfeifer Date: Mon, 18 Nov 2024 22:22:56 +0100 Subject: [PATCH] dpwsockx: Don't use true as a variable name. Revision 78bdd23406 (Oct 13 2023) introduced "true" as a variable name in DPWSCB_EnumSessions. This is a reserved identifier in C++ and recent versions of C and with GCC 15 going to move to -std=gnu23 (so essentically C23) we'd break. --- dlls/dpwsockx/dpwsockx_main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/dpwsockx/dpwsockx_main.c b/dlls/dpwsockx/dpwsockx_main.c index 6bfa70e916b..430901b452c 100644 --- a/dlls/dpwsockx/dpwsockx_main.c +++ b/dlls/dpwsockx/dpwsockx_main.c @@ -516,7 +516,7 @@ static HRESULT WINAPI DPWSCB_EnumSessions( LPDPSP_ENUMSESSIONSDATA data ) DPWS_DATA *dpwsData; DWORD dpwsDataSize; SOCKADDR_IN addr; - BOOL true = TRUE; + BOOL trueflag = TRUE; SOCKET sock; HRESULT hr; @@ -539,8 +539,9 @@ static HRESULT WINAPI DPWSCB_EnumSessions( LPDPSP_ENUMSESSIONSDATA data ) return DPERR_UNAVAILABLE; } - if ( SOCKET_ERROR == setsockopt( sock, SOL_SOCKET, SO_BROADCAST, (const char *) &true, - sizeof( true ) ) ) + if ( SOCKET_ERROR == setsockopt( sock, SOL_SOCKET, SO_BROADCAST, + (const char *) &trueflag, + sizeof( trueflag ) ) ) { ERR( "setsockopt() failed\n" ); closesocket( sock );