| Message ID | 20231111081808.30967-1-gert@greenie.muc.de |
|---|---|
| State | Accepted |
| Headers |
Return-Path: <openvpn-devel-bounces@lists.sourceforge.net>
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 <openvpn-devel-bounces@lists.sourceforge.net>)
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 <gert@blue.greenie.muc.de>) 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 <openvpn-devel@lists.sourceforge.net>; 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 <gert@greenie.muc.de>
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:
<gerrit.1699637918000.I0c78ce452135fe2c80275da449215ba926471018@gerrit.openvpn.net>
References:
<gerrit.1699637918000.I0c78ce452135fe2c80275da449215ba926471018@gerrit.openvpn.net>
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 <frank@lichtenheld.com> 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: <openvpn-devel.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/options/openvpn-devel>,
<mailto:openvpn-devel-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive:
<http://sourceforge.net/mailarchive/forum.php?forum_name=openvpn-devel>
List-Post: <mailto:openvpn-devel@lists.sourceforge.net>
List-Help: <mailto:openvpn-devel-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/openvpn-devel>,
<mailto:openvpn-devel-request@lists.sourceforge.net?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
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?=
|
| Series |
[Openvpn-devel,v1] platform.c: Do not depend Windows build on HAVE_CHDIR
|
|
Commit Message
Gert Doering
Nov. 11, 2023, 8:18 a.m. UTC
From: Frank Lichtenheld <frank@lichtenheld.com> 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 <frank@lichtenheld.com> Acked-by: Lev Stipakov <lstipakov@gmail.com> --- 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 <lstipakov@gmail.com>
Comments
This patch will do the job, but I think (at least for "master") we should
do a bit more thorough job - as in, get rid of HAVE_CHDIR completely, in
autoconf, cmake, header files. There is no platform where we have a remote
chance in getting OpenVPN ported that has no chdir(), so this is all
a nice excercise in achieving nothing.
I have not tested this beyond "does it compile?" but the change looks
reasonable and Lev has ACKed it.
Your patch has been applied to the master and release/2.6 branch.
commit 012ea92c414282488e3d60c87452849bde64aac4 (master)
commit b705517b12d14876a12593416a45756b7a952f1e (release/2.6)
Author: Frank Lichtenheld
Date: Sat Nov 11 09:18:08 2023 +0100
platform.c: Do not depend Windows build on HAVE_CHDIR
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Lev Stipakov <lstipakov@gmail.com>
Message-Id: <20231111081808.30967-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg27362.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
--
kind regards,
Gert Doering
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 } /*