From patchwork Wed Jul 10 16:02:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Lichtenheld X-Patchwork-Id: 3763 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:518c:b0:59e:d24b:d55c with SMTP id g12csp437153mae; Wed, 10 Jul 2024 09:03:16 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWIqlDGY4QSE1Qo2EkbU3oNQC/VLPAIu0swQHxyHp2W+kaDfd/uALhb+icwOXoI40WI1QIAZ48HIR3lh7vuu5fAvH5PDdc= X-Google-Smtp-Source: AGHT+IHaGaOcEARO61833VbsuQre9XbTgjtsW4ZdhhLzTYRPwb54rSIIqxilkTAwxOMX6TaK3GgL X-Received: by 2002:a05:6a20:3948:b0:1c0:e263:77dd with SMTP id adf61e73a8af0-1c2982149b1mr6213677637.1.1720627396605; Wed, 10 Jul 2024 09:03:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720627396; cv=none; d=google.com; s=arc-20160816; b=wy3WDtc/zlWgM8EbC4U3V/r1bWIL7ljcP3keBvlNVGlF+2+Ojat8IlzQ4HIeYXBwRH usBoWrQmNiz9SjE1eFzA0bKe+czpBHVHhSPSJmHk0KmReLzHVXrBMGZI/NqjLrzV00ra v7cUcG4Ex/BpsINt8B5yNKp6ze/cHcYsR87e0xaIt/r9nhhIicQOAsq215eTRSntzRex yRpNayd59s/1rIZO4kZ9vGIFleTXDJk7UCafh8NlFW+892Ss5jb3cAAv3z8vPLZr4AUx bTUT5x3uCD1I5n54QVU4y7RbIKgWYu4Rr2p0eM1ZyVUxqYy8osk0ijoTTIjhwh+CdkFX kFpw== 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:dkim-signature; bh=+vOlVSdanxmvRpLqufJcsd8yFuaNI/jD2iU3MyNovlg=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=1GbeHGqZB5rmJgPYh0BaJTFIhZX3AZ8pboPfc10sixpUk3/3cZ08+n1xvTIIvc+Rgd O/tPd6h2Ha16LM8ATFcsCpTS3BLGQ/CmucuJhaH0JigiC/m+wZDSCOyZIVBCHH86kn84 UehnDynITOujtAmOmpwdzxc5dofzoqgnMF2RHAP4XDS0SEnhI6q5DbmlNUOGGj5DwaPD hmUWUzMvoyYgDQ3VGBFCWVEay8EM6um6YxxBxfiitWo0NFp0Mv4KfrTwq8WljN4FAxqI rKn6GBDAluXropTxXuNqIpic71A0tnOSmX7rG/sF/9lThi2IS0j9x2Kpsuqo2ghXumKY 1MVg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=AgrnHNl2; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=eg05vaNN; dkim=neutral (body hash did not verify) header.i=@lichtenheld.com header.s=MBO0001 header.b=qsc27Qwi; 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 d2e1a72fcca58-70b437c0a75si4247273b3a.67.2024.07.10.09.03.16 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Jul 2024 09:03:16 -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=AgrnHNl2; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=eg05vaNN; dkim=neutral (body hash did not verify) header.i=@lichtenheld.com header.s=MBO0001 header.b=qsc27Qwi; 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 1sRZmT-0002aM-UC; Wed, 10 Jul 2024 16:02:58 +0000 Received: from [172.30.29.66] (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 1sRZmR-0002Zv-6b for openvpn-devel@lists.sourceforge.net; Wed, 10 Jul 2024 16:02:56 +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:Cc:To:From:Sender:Reply-To: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=1ryID2zgw1Z3zYctPZdqZgW9vMNRtsO4JLVFlpkQsEQ=; b=AgrnHNl2NCOWnYIiJZr7oCMput x1wPABF6x56UiHgyGCGKD5nYj29Pd5JhSPz/HGGhXAny1JLGyzySAqK8qO3JN3WEa8z4/kOuyGR72 3ltnr1cJXXIkS8mKkkVysMVxIHbg4zJKb+8FVGq3RLg2BTkdv6ZFR2zs5FJ+M2u3b8kE=; 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:Cc:To:From:Sender:Reply-To: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=1ryID2zgw1Z3zYctPZdqZgW9vMNRtsO4JLVFlpkQsEQ=; b=eg05vaNNTl8LdhaHv7D4pIDmk8 nC/LVbzVCszRrcbqpa2xdEEQKRAG9k5DHNfRbTRRIEe+m3Rd5h7IVd3UMoeX1z8LUyYD4x//OY9yt dU7DI19Z51e6NVekswZA3xluc7IO2K1WYkhwL1oU3dn3qd+fK7FFbwNX/j0xJABUuliA=; Received: from mout-p-103.mailbox.org ([80.241.56.161]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1sRZmQ-0001e2-HO for openvpn-devel@lists.sourceforge.net; Wed, 10 Jul 2024 16:02:54 +0000 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4WK2gh1709z9spm; Wed, 10 Jul 2024 18:02:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lichtenheld.com; s=MBO0001; t=1720627360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1ryID2zgw1Z3zYctPZdqZgW9vMNRtsO4JLVFlpkQsEQ=; b=qsc27QwiwTkMXzK2VADsCL7IhF4wa4D29RFfEX7IDiwyil0ui1uWCNuYoO6b2mTbzX8Vny uTcB5cxlausTPEfE8vZrIYLR7NGrscJS2Q4MEqIvWqDl1SSvEOAONPLyr9sLMZE2v2kwyM +S5tf3uvIHawcIILVSa+hCfICcqC5ZIdZUbXGIg2SXvVhC03eMm7piZcy+U1KLnYJm1s1N R6ZLB+oIrnUrfC7y3imSWqjjgNTrcX2LBxtGHXHEUPftyHgnwvTu8MttNJUswOmP5aVgpX j4pioNlnhqWER27jCMyERYiqKS46kr64GTPMegIuxZrNHtntC8BATgtp/1MLHA== From: Frank Lichtenheld To: openvpn-devel@lists.sourceforge.net Date: Wed, 10 Jul 2024 18:02:38 +0200 Message-Id: <20240710160238.190189-1-frank@lichtenheld.com> In-Reply-To: References: MIME-Version: 1.0 X-Rspamd-Queue-Id: 4WK2gh1709z9spm X-Spam-Score: -5.2 (-----) 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: Arne Schwabe Anonymous unions/structs are technically a custom GNU C99 feature but was already widely supported by other compilers. With C11 this feature has become a standard feature so all compilers nowadays sup [...] Content analysis details: (-5.2 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: cmake.in] -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [80.241.56.161 listed in list.dnswl.org] 0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [80.241.56.161 listed in sa-trusted.bondedsender.org] 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [80.241.56.161 listed in bl.score.senderscore.com] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [80.241.56.161 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-Headers-End: 1sRZmQ-0001e2-HO Subject: [Openvpn-devel] [PATCH v3] Remove check for anonymous unions from configure and cmake config 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?1804208592522568172?= X-GMAIL-MSGID: =?utf-8?q?1804208592522568172?= From: Arne Schwabe Anonymous unions/structs are technically a custom GNU C99 feature but was already widely supported by other compilers. With C11 this feature has become a standard feature so all compilers nowadays support it. Change-Id: I1ef5f6f21f0135a628a63553c39515fa4549ce87 Signed-off-by: Arne Schwabe Acked-by: Frank Lichtenheld --- 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/+/588 This mail reflects revision 3 of this Change. Acked-by according to Gerrit (reflected above): Frank Lichtenheld diff --git a/config.h.cmake.in b/config.h.cmake.in index 720d679..18af5e9 100644 --- a/config.h.cmake.in +++ b/config.h.cmake.in @@ -65,9 +65,6 @@ /* Enable --x509-username-field feature */ #cmakedefine ENABLE_X509ALTUSERNAME -/* Compiler supports anonymous unions */ -#define HAVE_ANONYMOUS_UNION_SUPPORT - /* Define to 1 if you have the header file. */ #cmakedefine HAVE_ARPA_INET_H 1 diff --git a/configure.ac b/configure.ac index 555c97e..1f03f90 100644 --- a/configure.ac +++ b/configure.ac @@ -564,28 +564,6 @@ , [[${SOCKET_INCLUDES}]] ) -AC_MSG_CHECKING([anonymous union support]) -AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[ - struct mystruct { - union { - int m1; - char m2; - }; - }; - ]], - [[ - struct mystruct s; - s.m1 = 1; s.m2 = 2; - ]] - )], - [ - AC_MSG_RESULT([yes]) - AC_DEFINE([HAVE_ANONYMOUS_UNION_SUPPORT], [], [Compiler supports anonymous unions]) - ], - [AC_MSG_RESULT([no])] -) saved_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -Wl,--wrap=exit" diff --git a/src/openvpn/mroute.h b/src/openvpn/mroute.h index bc58493..8b457d4 100644 --- a/src/openvpn/mroute.h +++ b/src/openvpn/mroute.h @@ -96,17 +96,7 @@ uint8_t prefix[12]; in_addr_t addr; /* _network order_ IPv4 address */ } v4mappedv6; - } -#ifndef HAVE_ANONYMOUS_UNION_SUPPORT -/* Wrappers to support compilers that do not grok anonymous unions */ - mroute_union -#define raw_addr mroute_union.raw_addr -#define ether mroute_union.ether -#define v4 mroute_union.v4 -#define v6 mroute_union.v6 -#define v4mappedv6 mroute_union.v4mappedv6 -#endif - ; + }; }; /* Double-check that struct packing works as expected */