From 297ed93ae0b698677759101e82ee1e87efbb943d Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Wed, 10 Oct 2018 11:15:37 +0200 Subject: [PATCH] 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 --- src/rpc/genprotocol.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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");