For future work we need _virDomainEventGraphicsAddress and _virDomainEventGraphicsSubjectIdentity members to be char * not const char *. We are strdup()ing them anyway, so they should have been char * anyway (from const correctness POV). However, we don't want users to change passed values, so we need to make the callback's argument const. --- include/libvirt/libvirt.h.in | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in index 693b834..1804c93 100644 --- a/include/libvirt/libvirt.h.in +++ b/include/libvirt/libvirt.h.in @@ -4504,8 +4504,8 @@ typedef enum { */ struct _virDomainEventGraphicsAddress { int family; /* Address family, virDomainEventGraphicsAddressType */ - const char *node; /* Address of node (eg IP address, or UNIX path) */ - const char *service; /* Service name/number (eg TCP port, or NULL) */ + char *node; /* Address of node (eg IP address, or UNIX path) */ + char *service; /* Service name/number (eg TCP port, or NULL) */ }; typedef struct _virDomainEventGraphicsAddress virDomainEventGraphicsAddress; typedef virDomainEventGraphicsAddress *virDomainEventGraphicsAddressPtr; @@ -4520,8 +4520,8 @@ typedef virDomainEventGraphicsAddress *virDomainEventGraphicsAddressPtr; * some examples are 'x509dname' and 'saslUsername'. */ struct _virDomainEventGraphicsSubjectIdentity { - const char *type; /* Type of identity */ - const char *name; /* Identity value */ + char *type; /* Type of identity */ + char *name; /* Identity value */ }; typedef struct _virDomainEventGraphicsSubjectIdentity virDomainEventGraphicsSubjectIdentity; typedef virDomainEventGraphicsSubjectIdentity *virDomainEventGraphicsSubjectIdentityPtr; @@ -4560,10 +4560,10 @@ typedef virDomainEventGraphicsSubject *virDomainEventGraphicsSubjectPtr; typedef void (*virConnectDomainEventGraphicsCallback)(virConnectPtr conn, virDomainPtr dom, int phase, - virDomainEventGraphicsAddressPtr local, - virDomainEventGraphicsAddressPtr remote, + const virDomainEventGraphicsAddressPtr local, + const virDomainEventGraphicsAddressPtr remote, const char *authScheme, - virDomainEventGraphicsSubjectPtr subject, + const virDomainEventGraphicsSubjectPtr subject, void *opaque); /** -- 1.8.2.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list