]> xenbits.xensource.com Git - libvirt.git/commitdiff
Fix build for SystemTap 1.0
authorMatthias Bolte <matthias.bolte@googlemail.com>
Fri, 22 Oct 2010 21:36:42 +0000 (23:36 +0200)
committerMatthias Bolte <matthias.bolte@googlemail.com>
Tue, 26 Oct 2010 11:28:32 +0000 (13:28 +0200)
With SystemTap 1.0 a part of the generated macros in probes.h
expands to:

volatile __typeof__(((name))) arg2 = (name);

GCC reports an 'invalid initialize' error when name has type
char[]. Therfore, add casts to char* to avoid this.

daemon/libvirtd.c
daemon/remote.c

index 8e88d053f4ffdda52c01de66223ca385cd130536..d3f003ebb6297a758e1c408d5112764edc475187 100644 (file)
@@ -1230,11 +1230,11 @@ remoteCheckCertificate(struct qemud_client *client)
         }
     }
 
-    PROBE(CLIENT_TLS_ALLOW, "fd=%d, name=%s", client->fd, name);
+    PROBE(CLIENT_TLS_ALLOW, "fd=%d, name=%s", client->fd, (char *)name);
     return 0;
 
 authdeny:
-    PROBE(CLIENT_TLS_DENY, "fd=%d, name=%s", client->fd, name);
+    PROBE(CLIENT_TLS_DENY, "fd=%d, name=%s", client->fd, (char *)name);
     return -1;
 
 authfail:
index 3b72f98ae6d37f4a9296e58b7b1b35b38ef10d0b..50ccb3b476d036563bc44caf6aea6dc9fdce6e03 100644 (file)
@@ -4223,7 +4223,7 @@ remoteDispatchAuthPolkit (struct qemud_server *server,
         goto authdeny;
     }
     PROBE(CLIENT_AUTH_ALLOW, "fd=%d, auth=%d, username=%s",
-          client->fd, REMOTE_AUTH_POLKIT, ident);
+          client->fd, REMOTE_AUTH_POLKIT, (char *)ident);
     VIR_INFO(_("Policy allowed action %s from pid %d, uid %d"),
              action, callerPid, callerUid);
     ret->complete = 1;
@@ -4238,7 +4238,7 @@ authfail:
 
 authdeny:
     PROBE(CLIENT_AUTH_DENY, "fd=%d, auth=%d, username=%s",
-          client->fd, REMOTE_AUTH_POLKIT, ident);
+          client->fd, REMOTE_AUTH_POLKIT, (char *)ident);
     goto error;
 
 error: