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 <abolo...@redhat.com>
---
 src/rpc/genprotocol.pl | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/rpc/genprotocol.pl b/src/rpc/genprotocol.pl
index adf3991d7a..37216303dc 100755
--- a/src/rpc/genprotocol.pl
+++ b/src/rpc/genprotocol.pl
@@ -41,6 +41,8 @@ unlink $target;
 
 if ($rpcgen =~ /portable-rpcgen/) {
     $rpcgen = "$rpcgen -o -";
+} else {
+    $rpcgen = "$rpcgen -C";
 }
 open RPCGEN, "-|", "$rpcgen $mode $xdrdef"
     or die "cannot run $rpcgen $mode $xdrdef: $!";
-- 
2.41.0
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-le...@lists.libvirt.org

Reply via email to