From patchwork Thu Jun 29 21:56:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 3261 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7301:3c07:b0:d9:b492:11d6 with SMTP id ki7csp2112862dyb; Thu, 29 Jun 2023 14:56:53 -0700 (PDT) X-Google-Smtp-Source: APBJJlHZBkUoYQViStKeOTImtMJLbfateRVdVxuPx4rjSEkB/ZXxzNqRo7gKkl0N6uYhIMgtjyVs X-Received: by 2002:a17:903:182:b0:1b8:5541:9d39 with SMTP id z2-20020a170903018200b001b855419d39mr541004plg.26.1688075812490; Thu, 29 Jun 2023 14:56:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688075812; cv=none; d=google.com; s=arc-20160816; b=fulu/nBpsE4xdJ5+C/PmQuXrnLMak6+JzzupN+U0lRoxx69KPVQAZBaWGtodbeft3C YFZ034ZSB/s1cl+qmt5Ret/+eZln6M96HQdijMP7qZ3KJq8i6SqgAew+Q1tyoGQ7eQEp PrW2mdiLnb+MNBZK/UvFK+Z5iTgdm0xMKSYe9tqC+eaVDXTw2c4D8fEDsTPk3N0lsYYj 9rQK3lQQsWYADmdq8jhYUfrWwOK31MVNpCXqSHqbZO6pSoOBXzU6ugUDTnBuoc4F0EZE wLYN1IiNJCTROdRoK/OSr1JO4Q5pOqsYDH8GYZqsMmlzTUK0q4bo8gKwB26TNdJ88NI4 tP8A== 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=5F8EB2JFTW8nmjJD2Z5++ihBd/1mdr9PDZpdsfC/Vxs=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=JA4c1RWDTZ442BKfCFKgI6eaQA+FXK/TyAl8oC97qvGSuCIJew8zQGkgQ2HoeyK4QS Um5koUj/UPbGUHBLgkqxqXrf+gTfW3ABs+/CGnyDzZIgsLs2ygHpr0r9+xlZkccjqqSj /bUFnuyCOPYDxVhycK1DUHpGahGvEo2QpmURxVm+I9qSacflDLsr61IAJXXHcvNN5Ehg oknA61wTdxcCJPyYIxhOVHDiiUNMcq1TPZLWaurBatf+pb8N1DmBAH52EGruArdwCc/z 6fG12uT2DguQa6mmcUsr0LIWT5ZBIu29VKu6xNcbYd283K1MuH6bOnsIR4w/fG8jRFpw CHFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=DVM1Y56Y; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=CWLR8zRc; 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 Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id m3-20020a170902bb8300b001b80643d64dsi7460535pls.145.2023.06.29.14.56.52 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Jun 2023 14:56:52 -0700 (PDT) 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=DVM1Y56Y; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=CWLR8zRc; 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 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 1qEzcp-0007qj-ET; Thu, 29 Jun 2023 21:56: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 1qEzcj-0007qW-SL for openvpn-devel@lists.sourceforge.net; Thu, 29 Jun 2023 21:56:22 +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=7ar1bvdce0SjHwgkfCAzTvT3EY69aEsdR2sp87LmJPQ=; b=DVM1Y56YQm8lX8mjItLVhowMHh AjjhadPcjbdjkOEuZC3S8Ryu9s6/QmGFf+9Sw/NqPgxr1fuNK4lhLqg1nTbnNQWKCOZXHmneCMFg0 lfmVf+wOE4l61oTf/Vw0UmPTZNoPrJthfwF0tje6fXVXdXjgECLdyT4fqYXm8AZ+X3pc=; 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=7ar1bvdce0SjHwgkfCAzTvT3EY69aEsdR2sp87LmJPQ=; b=CWLR8zRcLQ9m+GoWd0dp8tjCpj VbV1pHe8ycj7zYwL4l+j+ScBUmqWoM5WMZVQ76TDYD1vYrg9atsWdEstrS+2Rk4T8rP+nJMl/Jlqs pVHadY9dyXGedz5CADeR9/UXN8Z9ej1ZUZx2lzkAB14ucLQWIumobprsC+USFdKebSwM=; Received: from mail.blinkt.de ([192.26.174.232]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1qEzcg-001Oho-Ti for openvpn-devel@lists.sourceforge.net; Thu, 29 Jun 2023 21:56:22 +0000 Received: from kamera.blinkt.de ([2001:638:502:390:20c:29ff:fec8:535c]) by mail.blinkt.de with smtp (Exim 4.95 (FreeBSD)) (envelope-from ) id 1qEzcZ-0004WT-FJ for openvpn-devel@lists.sourceforge.net; Thu, 29 Jun 2023 23:56:11 +0200 Received: (nullmailer pid 3292837 invoked by uid 10006); Thu, 29 Jun 2023 21:56:11 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Thu, 29 Jun 2023 23:56:07 +0200 Message-Id: <20230629215611.3292788-2-arne@rfc2549.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230629215611.3292788-1-arne@rfc2549.org> References: <20230629215611.3292788-1-arne@rfc2549.org> MIME-Version: 1.0 X-Spam-Score: 0.3 (/) 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: On my system python3 is the macOS system python3 while rst2html has #!/opt/homebrew/opt/python@3.9/bin/python3.9 as its first line. Running that with a different python results in missing python modules. So directly execute the rst2html script instead. Content analysis details: (0.3 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-Headers-End: 1qEzcg-001Oho-Ti Subject: [Openvpn-devel] [PATCH 1/4] Do not blindly assume python3 is also the interpreter that runs rst2html 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?1770075783265843619?= X-GMAIL-MSGID: =?utf-8?q?1770075783265843619?= On my system python3 is the macOS system python3 while rst2html has #!/opt/homebrew/opt/python@3.9/bin/python3.9 as its first line. Running that with a different python results in missing python modules. So directly execute the rst2html script instead. Change-Id: I7e27ae031179c91cc1bca8122caf2453d6396ec0 Signed-off-by: Arne Schwabe Acked-By: Frank Lichtenheld --- doc/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index d38805513..2fba80bbd 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -50,13 +50,13 @@ if (_GENERATE_HTML_DOC) list(APPEND ALL_DOCS openvpn.8.html openvpn-examples.5.html) add_custom_command( OUTPUT openvpn.8.html - COMMAND ${PYTHON} ${RST2HTML} ${RST_FLAGS} ${CMAKE_CURRENT_SOURCE_DIR}/openvpn.8.rst ${CMAKE_CURRENT_BINARY_DIR}/openvpn.8.html + COMMAND ${RST2HTML} ${RST_FLAGS} ${CMAKE_CURRENT_SOURCE_DIR}/openvpn.8.rst ${CMAKE_CURRENT_BINARY_DIR}/openvpn.8.html MAIN_DEPENDENCY openvpn.8.rst DEPENDS ${OPENVPN_SECTIONS} ) add_custom_command( OUTPUT openvpn-examples.5.html - COMMAND ${PYTHON} ${RST2HTML} ${RST_FLAGS} ${CMAKE_CURRENT_SOURCE_DIR}/openvpn-examples.5.rst ${CMAKE_CURRENT_BINARY_DIR}/openvpn-examples.5.html + COMMAND ${RST2HTML} ${RST_FLAGS} ${CMAKE_CURRENT_SOURCE_DIR}/openvpn-examples.5.rst ${CMAKE_CURRENT_BINARY_DIR}/openvpn-examples.5.html MAIN_DEPENDENCY openvpn-examples.5.rst DEPENDS ${OPENVPN_EXAMPLES_SECTIONS} ) @@ -65,13 +65,13 @@ if (_GENERATE_MAN_DOC) list(APPEND ALL_DOCS openvpn.8 openvpn-examples.5) add_custom_command( OUTPUT openvpn.8 - COMMAND ${PYTHON} ${RST2MAN} ${RST_FLAGS} ${CMAKE_CURRENT_SOURCE_DIR}/openvpn.8.rst ${CMAKE_CURRENT_BINARY_DIR}/openvpn.8 + COMMAND ${RST2MAN} ${RST_FLAGS} ${CMAKE_CURRENT_SOURCE_DIR}/openvpn.8.rst ${CMAKE_CURRENT_BINARY_DIR}/openvpn.8 MAIN_DEPENDENCY openvpn.8.rst DEPENDS ${OPENVPN_SECTIONS} ) add_custom_command( OUTPUT openvpn-examples.5 - COMMAND ${PYTHON} ${RST2MAN} ${RST_FLAGS} ${CMAKE_CURRENT_SOURCE_DIR}/openvpn-examples.5.rst ${CMAKE_CURRENT_BINARY_DIR}/openvpn-examples.5 + COMMAND ${RST2MAN} ${RST_FLAGS} ${CMAKE_CURRENT_SOURCE_DIR}/openvpn-examples.5.rst ${CMAKE_CURRENT_BINARY_DIR}/openvpn-examples.5 MAIN_DEPENDENCY openvpn-examples.5.rst DEPENDS ${OPENVPN_EXAMPLES_SECTIONS} ) From patchwork Thu Jun 29 21:56:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 3262 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7301:3c07:b0:d9:b492:11d6 with SMTP id ki7csp2113009dyb; Thu, 29 Jun 2023 14:57:15 -0700 (PDT) X-Google-Smtp-Source: APBJJlHgUMre+fIPWZDHrnw2oahNAQmaKsTteIcIEDzXf0GOTOevBCjUe82Z/mgnGlPoLI2ktwKA X-Received: by 2002:a05:6a00:3983:b0:668:731b:517e with SMTP id fi3-20020a056a00398300b00668731b517emr1415528pfb.24.1688075835714; Thu, 29 Jun 2023 14:57:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688075835; cv=none; d=google.com; s=arc-20160816; b=QFhmmihjfstBnqu8RbXYHUAOTWgni/Oi3CXHFLlY6jM9ldN9KOUEK5fB6wHb99bmNd CKkP/3noqmdAqGS7GamX03T9yjWuAayrprffOt4IQ2s7iVB/nI26gZ2Mh677nqK2HIJI 0lwWZCr3xUzkFxxl3BySfBQbJEbaEAbrwhOYqPwsenIstX8D/HxsBg5s4mqrTtw9RLrw EfYnNOvHoPj/rNTXVMu0mRb5JvPbLSEjjm2hELHbnEk+xoVt2CVsg441n93Rxe4OXkqd 8d9AcPt4ToVAPcF4JXM2YiDdNfQXLo2iNTc7u4ooM7BTMW3MJ7o9ZlsAOgx+yuc0MNjs Dydg== 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=MWtovdK/3uz2LYIsdCKmQKFU5HPO0poKnsffvN4gA+4=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=CTPN1I4kDY4+aHxls8dgNGVt6pmLbb7IMKH7T7I5ba2/zsLxM5KXWUjCeZWptLVD4X +B69czBj+HbgvvXp4LV3bqEQCI6MqXFv5Li513nyQfS87A7cbogzk6SBajATi4q00+Qv FHUWoVtjRxIxSd30HyhLVzE0UzE8ZSQUo+xXHWGar3QwccPKaLrk26LrYeG6KLcUVtaJ Vn9O6SUJRU39HWC+PQFTH+5cWiLJmt6PYXb6r53yK8c1zL/TMyBo0ofKgyfNiw+vzUm9 2+/uved3Gv4RkzFENkoZdRGIXHWjjnX1ZbkMMa7p9CKxwfb66/W6XatzrmgxjvcT4uez fdDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=dE6uufOc; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=gHYUQF3H; 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 Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id cm26-20020a056a00339a00b0067d2eeacad6si5536017pfb.338.2023.06.29.14.57.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Jun 2023 14:57:15 -0700 (PDT) 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=dE6uufOc; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=gHYUQF3H; 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 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 1qEzcq-0007qw-Tz; Thu, 29 Jun 2023 21:56:29 +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 1qEzcm-0007qd-I1 for openvpn-devel@lists.sourceforge.net; Thu, 29 Jun 2023 21:56:24 +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=MHl/WMg7Lr+JaoekX6EyIecsRfprV6B4kFSvb3Vzx2c=; b=dE6uufOcvtS9kLUChKfEF3eKv7 REsDuG93YAjgSG3gMSzw2kckR8O5MjLP/enyeihPAeP8Q3z1R+2i1udqWtIWEYpJ3CfhfvbNvvHxT 0KAm4fYti33/Uj6KDiOMTJhfx4BNEGmQY8wfH2yKz4ZzYFaaPc2YcMxg3yAdOQWi1Hoo=; 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=MHl/WMg7Lr+JaoekX6EyIecsRfprV6B4kFSvb3Vzx2c=; b=gHYUQF3H2kMtoOLBV9ftw+8FgE zPfU/eNG/Hjxivsv+2KOPk64s37Ab2UdvpA34Qcgw30YDXAQIw4vVt0Z4hA0aeXJGpQlCuyyFSDHS ztBEBj4zWZum0qp0PHmpuzvpdJW4hzr9RBuUYo+dMjVY1U69x4VR2S+aqe86tqAppVqY=; Received: from mail.blinkt.de ([192.26.174.232]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1qEzcm-0002GQ-74 for openvpn-devel@lists.sourceforge.net; Thu, 29 Jun 2023 21:56:24 +0000 Received: from kamera.blinkt.de ([2001:638:502:390:20c:29ff:fec8:535c]) by mail.blinkt.de with smtp (Exim 4.95 (FreeBSD)) (envelope-from ) id 1qEzcZ-0004WV-Fs for openvpn-devel@lists.sourceforge.net; Thu, 29 Jun 2023 23:56:11 +0200 Received: (nullmailer pid 3292839 invoked by uid 10006); Thu, 29 Jun 2023 21:56:11 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Thu, 29 Jun 2023 23:56:08 +0200 Message-Id: <20230629215611.3292788-3-arne@rfc2549.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230629215611.3292788-1-arne@rfc2549.org> References: <20230629215611.3292788-1-arne@rfc2549.org> MIME-Version: 1.0 X-Spam-Score: 0.3 (/) 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: The -Wno-stringop-truncation flag is only supported by some GCC versions and not by Clang (macOS, FreeBSD) at all. Move the includes to the top the file to have them available when running the check_c_compiler_flag. Content analysis details: (0.3 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-Headers-End: 1qEzcm-0002GQ-74 Subject: [Openvpn-devel] [PATCH 2/4] [CMake] Only add -Wno-stringop-truncation on supported compilers 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?1770075807364637940?= X-GMAIL-MSGID: =?utf-8?q?1770075807364637940?= The -Wno-stringop-truncation flag is only supported by some GCC versions and not by Clang (macOS, FreeBSD) at all. Move the includes to the top the file to have them available when running the check_c_compiler_flag. Change-Id: I452bc4ee935d13f8e9095d0a31805a3bbaff0cec Signed-off-by: Arne Schwabe Acked-by: Frank Lichtenheld --- CMakeLists.txt | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3cbba5a38..acebbb73c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,14 @@ project(openvpn) # and OpenSSL having version 1.1.1+ and generally does not offer the same # configurability like autoconf +find_package(PkgConfig REQUIRED) +include(CheckSymbolExists) +include(CheckIncludeFiles) +include(CheckCCompilerFlag) +include(CheckTypeSize) +include(CheckStructHasMember) +include(CTest) + option(UNSUPPORTED_BUILDS "Allow unsupported builds" OFF) if (NOT WIN32 AND NOT ${UNSUPPORTED_BUILDS}) @@ -70,7 +78,12 @@ else () set(CMAKE_CXX_FLAGS_RELEASE "-O2") set(CMAKE_C_FLAGS_DEBUG "-g -O1") set(CMAKE_CXX_FLAGS_DEBUG "-g -O1") - add_compile_options(-Wall -Wuninitialized -Wno-stringop-truncation) + add_compile_options(-Wall -Wuninitialized) + check_c_compiler_flag(-Wno-stringop-truncation NoStringOpTruncation) + + if (${NoStringOpTruncation}) + add_compile_options(-Wno-stringop-truncation) + endif() # We are not ready for this #add_compile_options(-Wconversion -Wno-sign-conversion -Wsign-compare) if (USE_WERROR) @@ -78,13 +91,6 @@ else () endif () endif () -find_package(PkgConfig REQUIRED) -include(CheckSymbolExists) -include(CheckIncludeFiles) -include(CheckTypeSize) -include(CheckStructHasMember) -include(CTest) - find_program(PYTHON NAMES python3 python) execute_process( COMMAND ${PYTHON} ${CMAKE_CURRENT_SOURCE_DIR}/contrib/cmake/parse-version.m4.py ${CMAKE_CURRENT_SOURCE_DIR}/version.m4 From patchwork Thu Jun 29 21:56:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 3259 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7301:3c07:b0:d9:b492:11d6 with SMTP id ki7csp2112810dyb; Thu, 29 Jun 2023 14:56:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4fSKQaTDTwaeY/IzwxJq1nPzryULEZkvjqHhtEroYpVK3hq2EUl9R6W0odpc2isThRm/ze X-Received: by 2002:a17:90b:291:b0:262:ec04:4ff7 with SMTP id az17-20020a17090b029100b00262ec044ff7mr6944515pjb.16.1688075805591; Thu, 29 Jun 2023 14:56:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688075805; cv=none; d=google.com; s=arc-20160816; b=PDLepYrswk8UOEDvxO91vIxASMNlJxPV5zHGg5u9NPNxQPGaZmcKJuAA+2R2hI3sI/ c32OIbpd4rSRDxoIyRw8/PIzoOUX0O+IYilrZJ2dLe46OYLuzLGgIJQmFqdeY2ZFJbJC ppqieNjgLVJAeBzgZDjdzKdBf4gQOkV4WAxUDQvakiGJNB+Dn/v3TilJL+WZ/b+dQjSn dC7iuGyhhOsuKCeX7WjXlRId6oDuDTgLKnCLKVhodc5z+mRHc2LZRdNDrbjB7fq7NU2n IDmFdiIc/y80pFPUMKTbBAzVAeKXXcfQrj5LXBG7D4feag4+5SEMUqCaLk+D42zNzW6j 4/Eg== 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=qqeSINV34gEHcYvE5FIOjnj5bHIV58KA8KCQAERlMO0=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=mXBwwIvF57Qx9Nipa5DVyp4GsBIq3g1r81LgdC/k71SrUbf8HVPOdyDK7oO45Df7vL 2POwffmxQY/XMosVnOEZ7Wmf6uMDtnhh2RHCxKR6Bg/74Nv3N32oP5qeVZBEnLIbDr8p E68zbR+YXDaqCnLQ+LcEDC13B0zsaCiT96I4XxX5itwlOe74DypIXyhXgcWhahn7jYyU mVX1iygN587dYCj1u+YjIgUaOKjPamqHvYVj9Qu+j+1s4StR9OcERtfXmYGHE/oIiFVG TA37Wo6dYhtI+DRAd9kPClafQcZKDGz+Na81QBSE9RcH6C45SiAZcWSr2uehhmQH3EYK dFew== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=XJ6gZvXA; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=d4cH4tRf; 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 Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id nl6-20020a17090b384600b0025ef1357d96si12157262pjb.67.2023.06.29.14.56.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Jun 2023 14:56:45 -0700 (PDT) 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=XJ6gZvXA; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=d4cH4tRf; 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 Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1qEzcr-0005nq-Oo; Thu, 29 Jun 2023 21:56:29 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qEzcm-0005nd-Oo for openvpn-devel@lists.sourceforge.net; Thu, 29 Jun 2023 21:56:24 +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=8EzTnpSADILEZHMdKt6dHfwh4IGTYoIOn241J0eqCrg=; b=XJ6gZvXAtm9cDDHTeMCW6cs4g6 JFw+Y1idVUwSQA0/iG+u+LI6efq7YIp+pa1/8L9ESMgh1j4Q7dK73re9vK56Nw9Yi79340zQlTU4C HsvmEwTH6YATnSaFbFp3crFx+2r+DZMiZ/BInackrhGTtHMk4iGDboEoV7jVm0s3AXsk=; 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=8EzTnpSADILEZHMdKt6dHfwh4IGTYoIOn241J0eqCrg=; b=d4cH4tRfJ5JMUodTcRHF+nXJmC bmEvtZIU5XyVtNZVwHYXv+ITZmD5mFi/BGCSfVeaoMwJO0HYRMDmSza22BiZlKkIz/vnzx0fR686c Fgjj4rpHL96ZJQQdTeSbuHZpTlbw2ZwBjLh+EVAQJ9roY5Y1rmtyi+ONh5cWja6vKJT4=; Received: from mail.blinkt.de ([192.26.174.232]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1qEzcm-0002GS-6p for openvpn-devel@lists.sourceforge.net; Thu, 29 Jun 2023 21:56:24 +0000 Received: from kamera.blinkt.de ([2001:638:502:390:20c:29ff:fec8:535c]) by mail.blinkt.de with smtp (Exim 4.95 (FreeBSD)) (envelope-from ) id 1qEzcZ-0004Wb-He for openvpn-devel@lists.sourceforge.net; Thu, 29 Jun 2023 23:56:11 +0200 Received: (nullmailer pid 3292844 invoked by uid 10006); Thu, 29 Jun 2023 21:56:11 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Thu, 29 Jun 2023 23:56:10 +0200 Message-Id: <20230629215611.3292788-5-arne@rfc2549.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230629215611.3292788-1-arne@rfc2549.org> References: <20230629215611.3292788-1-arne@rfc2549.org> MIME-Version: 1.0 X-Spam-Score: 0.2 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-2.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: This avoids build errors on macOS. Also the test_tls_crypt command works just fine on FreeBSD with its linkers, so do not make that test Linux only. Change-Id: Id26676bdc576c7d3d6726afa43fe6c7a397c579b Signed-off-by: Arne Schwabe --- CMakeLists.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) Content analysis details: (0.2 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Headers-End: 1qEzcm-0002GS-6p Subject: [Openvpn-devel] [PATCH 3/4] Check if the -wrap argument is actually supported by the platform's ld 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?1770075776015255584?= X-GMAIL-MSGID: =?utf-8?q?1770075776015255584?= This avoids build errors on macOS. Also the test_tls_crypt command works just fine on FreeBSD with its linkers, so do not make that test Linux only. Change-Id: Id26676bdc576c7d3d6726afa43fe6c7a397c579b Signed-off-by: Arne Schwabe --- CMakeLists.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index acebbb73c..d2445b414 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,6 +16,7 @@ find_package(PkgConfig REQUIRED) include(CheckSymbolExists) include(CheckIncludeFiles) include(CheckCCompilerFlag) +include(CheckLinkerFlag) include(CheckTypeSize) include(CheckStructHasMember) include(CTest) @@ -560,18 +561,20 @@ if (BUILD_TESTING) ) endif () - if (NOT MSVC) - # MSVC does not support --wrap + # MSVC and Apple's LLVM ld do not support --wrap + check_linker_flag(C -Wl,--wrap=parse_line LD_SUPPORTS_WRAP) + + if (${LD_SUPPORTS_WRAP}) list(APPEND unit_tests "test_argv" + "test_tls_crypt" ) endif () - # These tests work on only on Linux since they depend on special linker features + # These tests work on only on Linux since they depend on special Linux features if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") list(APPEND unit_tests "test_networking" - "test_tls_crypt" ) endif () From patchwork Thu Jun 29 21:56:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 3260 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7301:3c07:b0:d9:b492:11d6 with SMTP id ki7csp2112853dyb; Thu, 29 Jun 2023 14:56:51 -0700 (PDT) X-Google-Smtp-Source: APBJJlEs6s87DPlFC7x9YbFJAMNhepNACaF9SitxmHqWWS4nu3efYiiEweOdeMy4ho+Fa/Zk/nuz X-Received: by 2002:a17:90a:fa95:b0:263:76e8:b66f with SMTP id cu21-20020a17090afa9500b0026376e8b66fmr462742pjb.30.1688075811266; Thu, 29 Jun 2023 14:56:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688075811; cv=none; d=google.com; s=arc-20160816; b=yxAbsx/YZUAQUIzk3nreUZ1NY0+0qElTb/kIyNchcs0JybEjdymaQXd/VG8plfNt6y SErl/PGJY/o4QyzXxpCh3l5systE6w1mz33N7lHwORn9M5XlhrD2oqrAa74YRgxGXo6O mY5lIvXfXuWAY2dVeKEyjshDqHWkX2+dPvij8wPpHveP9i6+WLuYHRcmHlVFxX9n9vZX XpeTM5v1jbxxHEbucrobcsvSX5AlsFa99XLe4H7KAJlY2eVNThU6YLP31cdHTB+Qvv93 RvctRlXxy7mHfaOurubj3R0GfkDQBU8DOrXmF05m8jQx0FkHHFmPzCk9l3E8QKxXyn5r o3yw== 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=iifQQVAq+tjId0UiofGV5aQaqpDLys8jdz8rGHUfG6s=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=Mw3ZO92triaBlZESaRGBtot/VdM+wWlV6dDSm7VyvdznhC+r7mZ3FefB4A+y7wwuYU hRBJQfZV7yD2tkk6rnOWOZfmgbVkkSV3f55OcsJUy9mHLluj98u9Wmg8kU+O5imCn4qB R2d5rsgRa9QftkfranYfQjAzY3FWLY3oTb8/rvCwYXstg5Y4ykQq02fCe+hwBxA2qUZe tJOTbdeGKRJI2qf633AI0aH8Ws7YUbkQjm+Ote499EA/hePO6zCzUcbuS7vkmXz+8AJ+ 1pBr38Ks3z/IphKiTExeV7BMATKpkI8b+LXcDAl36816Ze+at0vprI1BKZFzw0Wse3t6 Wc9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b="R/OjolVC"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=CXUkAYM5; 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 Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id ay2-20020a17090b030200b00262f7d7d2dfsi7586799pjb.40.2023.06.29.14.56.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Jun 2023 14:56:51 -0700 (PDT) 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="R/OjolVC"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=CXUkAYM5; 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 Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1qEzcl-0005w6-Tb; Thu, 29 Jun 2023 21:56:24 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qEzcj-0005vz-PH for openvpn-devel@lists.sourceforge.net; Thu, 29 Jun 2023 21:56:22 +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=Zg6VpxS0BasaU9ooVZdi1hXScQ7mXcoC0C8GKOGyB0U=; b=R/OjolVCryyqjMPVAxNQPma5Kf EMe2VAZ511n9qwK1+F4liptqjv5ng+NlTXTwx1rG34u1pW8kzTdli3p/cVW51LPNBzuyyOFwL/D3l uZiW9h+lMzk34aoXUHo4WMyseEom+gAyz8SFPDcL+1xyjlI/WKE7TTqIURu4ttmMQ9i0=; 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=Zg6VpxS0BasaU9ooVZdi1hXScQ7mXcoC0C8GKOGyB0U=; b=CXUkAYM5zpkB8mcbCi+gVYHXq2 kCrd+PJe001in90q061P9bP1CgU0FQUuwV3I51mopfEUM5JtHFQ6+0triMF0edsbHMqloU6HbzfV3 Kn1VNfJbBmSAs9oUBD13B3ln7Svplq1tlNl7utHsImmOvTQ7XDECguZFS78bWAFM7NIA=; Received: from mail.blinkt.de ([192.26.174.232]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1qEzcg-001Ohn-Ti for openvpn-devel@lists.sourceforge.net; Thu, 29 Jun 2023 21:56:22 +0000 Received: from kamera.blinkt.de ([2001:638:502:390:20c:29ff:fec8:535c]) by mail.blinkt.de with smtp (Exim 4.95 (FreeBSD)) (envelope-from ) id 1qEzcZ-0004WZ-H3 for openvpn-devel@lists.sourceforge.net; Thu, 29 Jun 2023 23:56:11 +0200 Received: (nullmailer pid 3292847 invoked by uid 10006); Thu, 29 Jun 2023 21:56:11 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Thu, 29 Jun 2023 23:56:11 +0200 Message-Id: <20230629215611.3292788-6-arne@rfc2549.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230629215611.3292788-1-arne@rfc2549.org> References: <20230629215611.3292788-1-arne@rfc2549.org> MIME-Version: 1.0 X-Spam-Score: 0.3 (/) 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: the funktion is_on_link is not used on FreeBSD and triggers a warning/error (-Werror) on FreeBSD. Change-Id: I6757d6509ff3ff522d6de417372a21e73ccca3ba Signed-off-by: Arne Schwabe --- src/openvpn/route.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Content analysis details: (0.3 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-Headers-End: 1qEzcg-001Ohn-Ti Subject: [Openvpn-devel] [PATCH 4/4] Avoid unused function warning/error on FreeBSD 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?1770075781792342626?= X-GMAIL-MSGID: =?utf-8?q?1770075781792342626?= the funktion is_on_link is not used on FreeBSD and triggers a warning/error (-Werror) on FreeBSD. Change-Id: I6757d6509ff3ff522d6de417372a21e73ccca3ba Signed-off-by: Arne Schwabe --- src/openvpn/route.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/openvpn/route.c b/src/openvpn/route.c index d18acd016..2180b7d1a 100644 --- a/src/openvpn/route.c +++ b/src/openvpn/route.c @@ -1541,13 +1541,15 @@ local_route(in_addr_t network, return LR_NOMATCH; } -/* Return true if the "on-link" form of the route should be used. This is when the gateway for a +/* Return true if the "on-link" form of the route should be used. This is when the gateway for * a route is specified as an interface rather than an address. */ +#ifndef TARGET_FREEBSD static inline bool is_on_link(const int is_local_route, const unsigned int flags, const struct route_gateway_info *rgi) { return rgi && (is_local_route == LR_MATCH || ((flags & ROUTE_REF_GW) && (rgi->flags & RGI_ON_LINK))); } +#endif bool add_route(struct route_ipv4 *r,