aboutsummaryrefslogtreecommitdiffstats
path: root/testing/zangband/fix-random-num-gen.patch
diff options
context:
space:
mode:
Diffstat (limited to 'testing/zangband/fix-random-num-gen.patch')
-rw-r--r--testing/zangband/fix-random-num-gen.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/testing/zangband/fix-random-num-gen.patch b/testing/zangband/fix-random-num-gen.patch
new file mode 100644
index 0000000000..21d8bdec03
--- /dev/null
+++ b/testing/zangband/fix-random-num-gen.patch
@@ -0,0 +1,22 @@
+#RNG is not implemented properly for 64bit systems, without this Zangband hangs on character generation
+*** a/src/h-type.h 2005-06-05 01:54:21.000000000 +0900
+--- b/src/h-type.h 2017-08-30 21:46:23.723911618 +0900
+***************
+*** 103,108 ****
+--- 103,118 ----
+ typedef signed short s16b;
+ typedef unsigned short u16b;
+
++ /* detect 64 bit GCC */
++ #ifdef _LP64
++ #ifndef L64
++ #define L64 1
++ #endif
++ #ifndef USE_64B
++ #define USE_64B 1
++ #endif
++ #endif
++
+ /* Signed/Unsigned 32 bit value */
+ #ifdef L64 /* 64 bit longs */
+ typedef signed int s32b; \ No newline at end of file