You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/games-puzzle/mirrormagic/files/mirrormagic-2.0.2-64bit.patch

44 lines
888 B

From Debian:
In src/libgame/gadgets.c, check for 64bit when handling
GDI_TYPE,GDI_STATE in HandleGadgetTags() and use int instead of
unsigned long. Should probably really be uint32_t but I'll leave
that decision to upstream. Thanks Pelle Nilsson (and son).
64bit check borrowed from bug #496863. Closes: #498912.
--- src/libgame/gadgets.c
+++ src/libgame/gadgets.c
@@ -18,6 +18,12 @@
#include "text.h"
#include "misc.h"
+/* check for 64bit */
+#ifdef _LP64
+#ifndef L64
+#define L64 1
+#endif
+#endif
/* values for DrawGadget() */
#define DG_UNPRESSED 0
@@ -301,11 +307,19 @@
break;
case GDI_TYPE:
+#ifdef L64
+ gi->type = va_arg(ap, int);
+#else
gi->type = va_arg(ap, unsigned long);
+#endif
break;
case GDI_STATE:
+#ifdef L64
+ gi->state = va_arg(ap, int);
+#else
gi->state = va_arg(ap, unsigned long);
+#endif
break;
case GDI_CHECKED: