File gcin-reproducible.patch of Package gcin
Author: Bernhard M. Wiedemann <bwiedemann@suse.de>
A PIN_JUYIN struct occupies 10 bytes
(from how compilers do alignment and padding)
but the code only writes 9 of them
leading to random bytes in the output file
which makes builds unreproducible
unless ASLR is disabled in the build system
See https://reproducible-builds.org/ for why this matters.
Index: gcin-2.8.5/pin-juyin.cpp
===================================================================
--- gcin-2.8.5.orig/pin-juyin.cpp
+++ gcin-2.8.5/pin-juyin.cpp
@@ -16,6 +16,7 @@ int main()
PIN_JUYIN pinju[1024];
short pinjuN=0;
+ bzero(pinju, sizeof(pinju));
if ((fp=fopen(fnamein, "r"))==NULL)
p_err("cannot open %s", fnamein);