[PATCH] rpc: genprotocol: Always apply fixups to rpcgen's output

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

 



The platform check which determines when to apply the fixups mentions
all officially supported build targets (per docs/platforms.rst) thus
it's not really necessary.

Additionally while not explicitly written as supported the check does
not work properly when building with the MinGW toolchain on Windows as
it does not apply the needed transformations. They are necessary
there the same way as with MinGW on Linux.

https://gitlab.com/libvirt/libvirt/-/issues/453

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/rpc/genprotocol.pl | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/src/rpc/genprotocol.pl b/src/rpc/genprotocol.pl
index f567260588..adf3991d7a 100755
--- a/src/rpc/genprotocol.pl
+++ b/src/rpc/genprotocol.pl
@@ -1,6 +1,6 @@
 #!/usr/bin/env perl
 #
-# Generate code for an XDR protocol, optionally applying
+# Generate code for an XDR protocol, applying
 # fixups to the glibc rpcgen code so that it compiles
 # with warnings turned on.
 #
@@ -47,20 +47,11 @@ open RPCGEN, "-|", "$rpcgen $mode $xdrdef"
 open TARGET, ">$target"
     or die "cannot create $target: $!";

-my $fixup = $^O eq "linux" || $^O eq "gnukfreebsd" || $^O eq "freebsd" || $^O eq "darwin";
-
 if ($mode eq "-c") {
     print TARGET "#include <config.h>\n";
 }

 while (<RPCGEN>) {
-    # We only want to fixup the GLibc rpcgen output
-    # So just print data unchanged, if non-Linux
-    unless ($fixup) {
-        print TARGET;
-        next;
-    }
-
     if (m/^{/) {
         $in_function = 1;
         print TARGET;
-- 
2.39.2




[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