]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Fix compilation with systemtap 1.3
authorMatthias Bolte <matthias.bolte@googlemail.com>
Tue, 28 Jun 2011 22:33:09 +0000 (00:33 +0200)
committerMatthias Bolte <matthias.bolte@googlemail.com>
Tue, 28 Jun 2011 23:53:44 +0000 (01:53 +0200)
commitc565b67a6afcd470a3238008ac045b540d4ebed6
tree9b65df3231182a651a699f43bd7f87ab1c3d4708
parentf05759e0b5eebee6762ad426ba787e64b149fe91
Fix compilation with systemtap 1.3

Version 1.3 of <sys/sdt.h> uses this macro

  #define STAP_CAST(t) (size_t)t

that breaks like this if t is a function

  remote.c:1775: error: cast from function call of type 'const char *'
  to non-matching type 'long unsigned int' [-Wbad-function-cast]

For that to work it should probably look like this

  #define STAP_CAST(t) ((size_t)(t))

In systemtap 1.4 this was completely rewritten.

Anyway, before commit df0b57a95a767c t was always a variable, but now
also a function is used here, namely virNetSASLSessionGetIdentity.

Use an intermediate variable to avoid this problem.
daemon/remote.c