From patchwork Sat Nov 11 08:18:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 3426 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:3c06:b0:f2:62eb:61c1 with SMTP id e6csp222332dys; Sat, 11 Nov 2023 00:19:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IEorcg/ZArQ795zL2gNxNjDgIswmcmrkta5dRpJjTwEKjozfmvv2NNboq6wpbE/L2+lJMTu X-Received: by 2002:a05:6a00:3911:b0:6c4:d9a8:5ed6 with SMTP id fh17-20020a056a00391100b006c4d9a85ed6mr1689428pfb.0.1699690763863; Sat, 11 Nov 2023 00:19:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699690763; cv=none; d=google.com; s=arc-20160816; b=rVW1LC2L82hvnRgAdJrPk3ehakWbSVnz+aFbJV3TZSUHnC2E7A3y/vobjHCEQMl2oS G6kmhsWgHbCfUeR1Rk0VylIqvd+dOPlAeJr56nw1BnJlfgtluia5xCABUEDVl3ASioiO 657yCFb+iCXOY20M33f/hZo3ffHz5b3io2QwckMxMt8ucMZiQqrZt1Wd2kZ++Oc7oLYq mU3qTfljy/RpPgA+ZUj5TXhQX5SAL+LeqSAKYkVuiyVnBk2yG7BFK2S6DCEXrS6GjYnZ 9LNFsL2Q0Jygk9p5xxMoCcH1wUa+O0IfloamgKClMTxrR6XxjeScnBJMiG/xAZkEYtX3 2eig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature; bh=0/YiYxakKdQBirLR4uIjijtg0Xx9McFm2NZdai5MFC0=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=z0C7FREYrmg39N8ZbX4GbTPBFQ6Hg4uw5b1+vEUMfYjOtQ6OL9lEseSrzV6c06id6k KIkV5BevYYkFuXB5GuR3+OS2E/SrereVP8cgAsd4VuEvw/wdeb4cN8itanKIMg2LiYqS S82qbqSqws1EogaXAVeGq9BQDmAGEhiU9I2DWocI1DesbAe6HMiwp+IP6R4owjN1Zvv0 /kuoVY61J2QIsO9CXYz6aPL3UYikq8fT9WZ3+Nr0hWf9x2wp4t62PkPlrHB6Bi6aIHHn 6Y3bch2pR8BEDPuHMzC8xRG3lezgWPVVzeXclEvqdb0CvbvaL2KJXGpDuHtVyItmJCr2 uYUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=bjD7M86U; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b="gtk+gbB/"; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id e10-20020a056a001a8a00b006be0f482c0fsi1388565pfv.63.2023.11.11.00.19.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Nov 2023 00:19:23 -0800 (PST) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=bjD7M86U; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b="gtk+gbB/"; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1r1jCG-0001Qi-5r; Sat, 11 Nov 2023 08:18:27 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1r1jCE-0001Qb-ND for openvpn-devel@lists.sourceforge.net; Sat, 11 Nov 2023 08:18:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Da0EPpqqRWppslASLQikk6yZk4x09ROsL6NLSyJupeA=; b=bjD7M86UJ+KMn5DDItxBRsz215 JJgIqFK7ibEYkcOPXYQ15q7mBA1qAZrF9QctKQN5MC0XLPg0+MZG2BJY/4yYXM3nz7yZLMEFCefRB VRpGSBXTlH7n0dgDFYgaMov9Zj/3KFM5RreJv8P0bPdMAgewN7slDCQkoa+QRIroNp4c=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Da0EPpqqRWppslASLQikk6yZk4x09ROsL6NLSyJupeA=; b=gtk+gbB/ch9FVOqZD3GVaVshaU NChmHEvBK0eLZmoKNrhpDqCspZ54tZPK4Lb8Wo8FcpK1IeGvZ37EuSLRnJkJUIpNwT/t7jiLlrpSs v4B34TitqOFuBB4qzcjTszzQZNwjJV1JkhtHhU3ioUt6qjblXkq7CqCHz1HyYZLjnXWg=; Received: from dhcp-174.greenie.muc.de ([193.149.48.174] helo=blue.greenie.muc.de) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1r1jC7-00011r-Oo for openvpn-devel@lists.sourceforge.net; Sat, 11 Nov 2023 08:18:25 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.17.1.9/8.17.1.9) with ESMTP id 3AB8I9TG030977 for ; Sat, 11 Nov 2023 09:18:09 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.17.1.9/8.17.1.9/Submit) id 3AB8I9sb030976 for openvpn-devel@lists.sourceforge.net; Sat, 11 Nov 2023 09:18:09 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Sat, 11 Nov 2023 09:18:08 +0100 Message-ID: <20231111081808.30967-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: -0.0 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-1.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Frank Lichtenheld This broke in the CMake build since previously we just always set HAVE_CHDIR to 1 in the MSVC build. But actually the code should just not check HAVE_CHDIR on Windows. Content analysis details: (-0.0 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Headers-End: 1r1jC7-00011r-Oo Subject: [Openvpn-devel] [PATCH v1] platform.c: Do not depend Windows build on HAVE_CHDIR X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1782254942406313471?= X-GMAIL-MSGID: =?utf-8?q?1782254942406313471?= From: Frank Lichtenheld This broke in the CMake build since previously we just always set HAVE_CHDIR to 1 in the MSVC build. But actually the code should just not check HAVE_CHDIR on Windows. Change-Id: I0c78ce452135fe2c80275da449215ba926471018 Signed-off-by: Frank Lichtenheld Acked-by: Lev Stipakov --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/425 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Lev Stipakov diff --git a/src/openvpn/platform.c b/src/openvpn/platform.c index 32c4fe6..62acabe 100644 --- a/src/openvpn/platform.c +++ b/src/openvpn/platform.c @@ -392,7 +392,6 @@ int platform_chdir(const char *dir) { -#ifdef HAVE_CHDIR #ifdef _WIN32 int res; struct gc_arena gc = gc_new(); @@ -400,11 +399,12 @@ gc_free(&gc); return res; #else /* ifdef _WIN32 */ +#ifdef HAVE_CHDIR return chdir(dir); -#endif #else /* ifdef HAVE_CHDIR */ return -1; #endif +#endif } /*