From: Olaf Hering Date: Wed, 10 Oct 2018 09:15:37 +0000 (+0200) Subject: rpc: reproducible genprotocol output X-Git-Tag: v4.9.0-rc1~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=297ed93ae0b698677759101e82ee1e87efbb943d;p=thirdparty%2Flibvirt.git rpc: reproducible genprotocol output If the same source gets built twice ('build same source on different hosts at different times') the resulting files may differ. Fix this by sorting the hash keys before usage. Signed-off-by: Olaf Hering --- diff --git a/src/rpc/genprotocol.pl b/src/rpc/genprotocol.pl index 6ce268c024..6baa4f22d5 100755 --- a/src/rpc/genprotocol.pl +++ b/src/rpc/genprotocol.pl @@ -104,7 +104,7 @@ while () { if (keys %uses >= 1) { my $i = 1; - foreach (keys %uses) { + foreach (sort(keys %uses)) { $i = $uses{$_}; unshift @function, (" char **objp_cpp$i = (char **) (void *) &$_;\n");