From e15b7dfcdc20079e3be669eb9a610be404961f23 Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Tue, 24 Oct 2023 18:33:43 +0200 Subject: [PATCH] Make generation of has_foo.h files deterministic (#11651) Without this patch, order of entries in generated/has_{buses,cpus,formats,machines,sounds,videos}.h varied across builds. This patch was done while working on reproducible builds for openSUSE. Co-authored-by: Bernhard M. Wiedemann --- scripts/genie.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/genie.lua b/scripts/genie.lua index a98ea44e10b..9bf68e14a76 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -1530,7 +1530,7 @@ function generate_has_header(hashname, hash) file:write(string.format("#ifndef GENERATED_HAS_%s_H\n", hashname)) file:write(string.format("#define GENERATED_HAS_%s_H\n", hashname)) file:write("\n") - for k, v in pairs(hash) do + for k, v in ipairs(hash) do if v then file:write(string.format("#define HAS_%s_%s\n", hashname, k)) end