]> git.ipfire.org Git - thirdparty/libvirt.git/commit
genprotocol.pl: Fix code on FreeBSD too
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 27 Sep 2013 14:20:49 +0000 (16:20 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 27 Sep 2013 16:32:42 +0000 (18:32 +0200)
commit3f573fbae13638e9c434e7176aabe80e88713f64
treede20e2052bc5639f5dcf7d9456fa817465fd367a
parentb41bed70f1f3415e6951185d66fabb626358ac65
genprotocol.pl: Fix code on FreeBSD too

On some systems (linux, cygwin and gnukfreebsd) rpcgen generates files
which when compiling produces this warning:

remote/remote_protocol.c: In function 'xdr_remote_node_get_cpu_stats_ret':
remote/remote_protocol.c:530: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]

Hence, on those systems we need to post-process the files by the
rpc/genprotocol.pl perl script. At the beginning of the script the OS is
detected via $^O perl variable. From my latest build on FreeBSD I see we
need to fix the code there too. On FreeBSD the variable contains
'freebsd' string:

http://perldoc.perl.org/perlport.html#PLATFORMS

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/rpc/genprotocol.pl