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(a)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 6c664f48e7..5eb654cb7c 100755
--- a/src/rpc/genprotocol.pl
+++ b/src/rpc/genprotocol.pl
@@ -39,6 +39,8 @@ my $target = shift;
unlink $target;
+$rpcgen = "$rpcgen -C";
+
open RPCGEN, "-|", "$rpcgen $mode $xdrdef"
or die "cannot run $rpcgen $mode $xdrdef: $!";
open TARGET, ">$target"
--
2.41.0