mirror of https://gitee.com/openkylin/libvirt.git
rpc: Make rpcgen produce ANSI C code
This is the default for the version of rpcgen shipped with Linux distributions, but the one in macOS and possibly others default to K&R C, which modern compilers don't appreciate. Luckily, all versions of rpcgen shipped with our target platforms seem to support the -C option. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Laine Stump <laine@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
47ee78048c
commit
abb6906260
|
@ -41,6 +41,8 @@ unlink $target;
|
||||||
|
|
||||||
if ($rpcgen =~ /portable-rpcgen/) {
|
if ($rpcgen =~ /portable-rpcgen/) {
|
||||||
$rpcgen = "$rpcgen -o -";
|
$rpcgen = "$rpcgen -o -";
|
||||||
|
} else {
|
||||||
|
$rpcgen = "$rpcgen -C";
|
||||||
}
|
}
|
||||||
open RPCGEN, "-|", "$rpcgen $mode $xdrdef"
|
open RPCGEN, "-|", "$rpcgen $mode $xdrdef"
|
||||||
or die "cannot run $rpcgen $mode $xdrdef: $!";
|
or die "cannot run $rpcgen $mode $xdrdef: $!";
|
||||||
|
|
Loading…
Reference in New Issue