Skip to content

Commit d30ae14

Browse files
committed
Fixed compilarion failure on 32bit systems
Compile time assertion "sizeof(struct st_irem) % sizeof(double) == 0" started to fail on 32bit systems after my_thread_id was changed from ulong to int64. Fixed by added padding to struct st_irem on 32bit systems.
1 parent ed99046 commit d30ae14

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mysys/safemalloc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ struct st_irem
5555
struct st_irem *next; /* Linked list of structures */
5656
struct st_irem *prev; /* Other link */
5757
size_t datasize; /* Size requested */
58+
#if SIZEOF_SIZE_T == 4
59+
size_t pad; /* Compensate 32bit datasize */
60+
#endif
5861
#ifdef HAVE_BACKTRACE
5962
void *frame[SF_REMEMBER_FRAMES]; /* call stack */
6063
#endif

0 commit comments

Comments
 (0)