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 <bernhard+gitcommit lsmod.de>
This commit is contained in:
Bernhard M. Wiedemann 2023-10-24 18:33:43 +02:00 committed by GitHub
parent a0b96727b2
commit e15b7dfcdc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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