[libvirt PATCH v2 1/1] rpc: Make rpcgen produce ANSI C code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux