We have a file specifically for preventing circular inclusion. Move the virNetworkPortDefPtr typedef there for use by domain_conf.h. Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx> --- src/conf/domain_conf.h | 5 ----- src/conf/virconftypes.h | 3 +++ src/conf/virnetworkportdef.h | 4 +--- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 48b0af4b04..7daab395aa 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -3571,11 +3571,6 @@ bool virDomainDefLifecycleActionAllowed(virDomainLifecycle type, virDomainLifecycleAction action); -// Forward decl to avoid pulling in virnetworkportdef.h because -// that pulls in virhostdev.h which pulls in domain_conf.h (evil) -typedef struct _virNetworkPortDef virNetworkPortDef; -typedef virNetworkPortDef *virNetworkPortDefPtr; - virNetworkPortDefPtr virDomainNetDefToNetworkPort(virDomainDefPtr dom, virDomainNetDefPtr iface); diff --git a/src/conf/virconftypes.h b/src/conf/virconftypes.h index b8f553f7fb..fbd1de4100 100644 --- a/src/conf/virconftypes.h +++ b/src/conf/virconftypes.h @@ -344,3 +344,6 @@ typedef virDomainXMLPrivateDataCallbacks *virDomainXMLPrivateDataCallbacksPtr; typedef struct _virDomainXenbusControllerOpts virDomainXenbusControllerOpts; typedef virDomainXenbusControllerOpts *virDomainXenbusControllerOptsPtr; + +typedef struct _virNetworkPortDef virNetworkPortDef; +typedef virNetworkPortDef *virNetworkPortDefPtr; diff --git a/src/conf/virnetworkportdef.h b/src/conf/virnetworkportdef.h index 3d42b9b6a2..33ee628aa7 100644 --- a/src/conf/virnetworkportdef.h +++ b/src/conf/virnetworkportdef.h @@ -22,6 +22,7 @@ #pragma once #include "internal.h" +#include "virconftypes.h" #include "viruuid.h" #include "virnetdevvlan.h" #include "virnetdevvportprofile.h" @@ -32,9 +33,6 @@ #include "netdev_bandwidth_conf.h" #include "netdev_vlan_conf.h" -typedef struct _virNetworkPortDef virNetworkPortDef; -typedef virNetworkPortDef *virNetworkPortDefPtr; - typedef enum { VIR_NETWORK_PORT_PLUG_TYPE_NONE, VIR_NETWORK_PORT_PLUG_TYPE_NETWORK, -- 2.19.2 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list