]> xenbits.xensource.com Git - libvirt.git/commit
build: work around older systemtap header
authorEric Blake <eblake@redhat.com>
Fri, 1 Jul 2011 18:33:50 +0000 (12:33 -0600)
committerEric Blake <eblake@redhat.com>
Mon, 22 Aug 2011 12:57:16 +0000 (06:57 -0600)
commit6611d9ebccde31e3d9b5eb0ec279e8541fcbeda7
tree17b56285d6b89844328001d5eb8fa1cb022788f6
parentbaac9c37d778cee455ce8d49f95ad2d88770c34c
build: work around older systemtap header

Systemtap 1.2 <sys/sdt.h> tried to expand STAP_PROBE3 into an
initialization:
  volatile __typeof__(arg) foo = arg;
but that fails if arg was declared as 'char arg[100]'.
Rather than make all callers to PROBE deal with the stupidity
of <sys/sdt.h>, we instead make PROBE cast away the problem.
Some of this preprocessor abuse copies ideas in src/libvirt.c.

* daemon/libvirtd.h (PROBE): Add casts to all arguments, using...
(VIR_ADD_CASTS, VIR_ADD_CAST, VIR_ADD_CAST2, VIR_ADD_CAST3)
(VIR_ADD_CAST_EXPAND, VIR_ADD_CAST_PASTE, VIR_COUNT_ARGS)
(VIR_ARG5, PROBE_EXPAND): New macros.
Reported by Wen Congyang.
daemon/libvirtd.h