From nobody Mon Feb 9 19:04:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1560874597; cv=none; d=zoho.com; s=zohoarc; b=oo/o7yQ6Th2ZbMsF+NRKUyAZ7CvXWlxNL1Qu8mSU6spnsogHDE6BbkBTrahP2fyluAVBmDIjAVq630EKvL7iaWl6VXr1OTYw85vkNNDUFyF0u2pdYoexjB+BRts3QYGumXYpj/Vr+DDBcKwDkD1hLJQnwqMNmY4awXBjM+Sm1cs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560874597; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=d5pDClQiDC1aIy2E49tTQNTSNxmS/FYToXJcXURYIP4=; b=oAxiC9AhZ2Khb4WiHZWtr88SysLKKCupcIf0/2cQWC0+lY0vK7ZuhI5RHc79tbRoRy/528FXsbfqUvO2KXRbBVwm9zT/ns0fPJNKxuAGfqGTCtjCdp9eyVUU7UaSMIxpeR5/7QvkcVVR2g+tSSSSXdD9FYIUmtx+EITVTxbfLbI= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1560874597849167.8310681558553; Tue, 18 Jun 2019 09:16:37 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3B2A930C319C; Tue, 18 Jun 2019 16:16:36 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1202B7DDF9; Tue, 18 Jun 2019 16:16:36 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id C368C206D7; Tue, 18 Jun 2019 16:16:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x5IGDZ4C024347 for ; Tue, 18 Jun 2019 12:13:35 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3CEBD84EF; Tue, 18 Jun 2019 16:13:35 +0000 (UTC) Received: from aegolius.redhat.com (ovpn-117-198.phx2.redhat.com [10.3.117.198]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0B9BB60FAB for ; Tue, 18 Jun 2019 16:13:34 +0000 (UTC) From: Jonathon Jongsma To: libvir-list@redhat.com Date: Tue, 18 Jun 2019 11:13:03 -0500 Message-Id: <20190618161316.1722-34-jjongsma@redhat.com> In-Reply-To: <20190618161316.1722-1-jjongsma@redhat.com> References: <20190618161316.1722-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 33/46] util: socketaddr: use #pragma once in headers X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Tue, 18 Jun 2019 16:16:36 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Jonathon Jongsma Reviewed-by: J=C3=A1n Tomko --- src/util/virsocketaddr.h | 45 +++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/src/util/virsocketaddr.h b/src/util/virsocketaddr.h index 5230cddf64..b2ecb3c748 100644 --- a/src/util/virsocketaddr.h +++ b/src/util/virsocketaddr.h @@ -16,17 +16,16 @@ * . */ =20 -#ifndef LIBVIRT_VIRSOCKETADDR_H -# define LIBVIRT_VIRSOCKETADDR_H +#pragma once =20 -# include -# include -# ifdef HAVE_SYS_UN_H -# include -# endif +#include +#include +#ifdef HAVE_SYS_UN_H +# include +#endif =20 -# include "internal.h" -# include "virautoclean.h" +#include "internal.h" +#include "virautoclean.h" =20 /* On architectures which lack these limits, define them (ie. Cygwin). * Note that the libvirt code should be robust enough to handle the @@ -34,11 +33,11 @@ * length correctly in second argument to gethostname and by always * using strncpy instead of strcpy). */ -# ifndef INET_ADDRSTRLEN -# define INET_ADDRSTRLEN 16 -# endif +#ifndef INET_ADDRSTRLEN +# define INET_ADDRSTRLEN 16 +#endif =20 -# define VIR_LOOPBACK_IPV4_ADDR "127.0.0.1" +#define VIR_LOOPBACK_IPV4_ADDR "127.0.0.1" =20 typedef struct { union { @@ -46,27 +45,27 @@ typedef struct { struct sockaddr_storage stor; struct sockaddr_in inet4; struct sockaddr_in6 inet6; -# ifdef HAVE_SYS_UN_H +#ifdef HAVE_SYS_UN_H struct sockaddr_un un; -# endif +#endif } data; socklen_t len; } virSocketAddr; =20 -# define VIR_SOCKET_ADDR_VALID(s) \ +#define VIR_SOCKET_ADDR_VALID(s) \ ((s)->data.sa.sa_family !=3D AF_UNSPEC) =20 -# define VIR_SOCKET_ADDR_IS_FAMILY(s, f) \ +#define VIR_SOCKET_ADDR_IS_FAMILY(s, f) \ ((s)->data.sa.sa_family =3D=3D f) =20 -# define VIR_SOCKET_ADDR_FAMILY(s) \ +#define VIR_SOCKET_ADDR_FAMILY(s) \ ((s)->data.sa.sa_family) =20 -# define VIR_SOCKET_ADDR_IPV4_ALL "0.0.0.0" -# define VIR_SOCKET_ADDR_IPV6_ALL "::" +#define VIR_SOCKET_ADDR_IPV4_ALL "0.0.0.0" +#define VIR_SOCKET_ADDR_IPV6_ALL "::" =20 -# define VIR_SOCKET_ADDR_IPV4_ARPA "in-addr.arpa" -# define VIR_SOCKET_ADDR_IPV6_ARPA "ip6.arpa" +#define VIR_SOCKET_ADDR_IPV4_ARPA "in-addr.arpa" +#define VIR_SOCKET_ADDR_IPV6_ARPA "ip6.arpa" =20 typedef virSocketAddr *virSocketAddrPtr; =20 @@ -161,5 +160,3 @@ int virSocketAddrPTRDomain(const virSocketAddr *addr, void virSocketAddrFree(virSocketAddrPtr addr); =20 VIR_DEFINE_AUTOPTR_FUNC(virSocketAddr, virSocketAddrFree); - -#endif /* LIBVIRT_VIRSOCKETADDR_H */ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list