[hatari-devel] Definition of SIZEOF_VOID_P |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx, twilen@xxxxxxxxxx
- Subject: [hatari-devel] Definition of SIZEOF_VOID_P
- From: Andreas Grabher <andreas_g86@xxxxxxxxxx>
- Date: Tue, 14 Feb 2023 21:03:07 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1676405001; bh=7T3p6seNispIhnd1+P9Zok6zA0K/0weZ7/29C29OyBo=; h=From:Content-Type:Mime-Version:Subject:Message-Id:Date:To; b=LON6+8IQTWOqN2aD1TMBJuXXe2HdYzvPTUDoJ3qN4R2pGiA3hYi4NEzZwO0Nbjgt+ NKQGB927llA81W4Whs091R1q2Gk667GnyHRaA0nO+JI5grVFzq7sEkRHdAGnfiKVEo GYN4PUOx1F6UBYM2U4DpLcV1ifR3ZTyldL+Wkbg4JF1Uqq/pcR4FFjdcFZuSUBo9m1 f33SGMcfBP4ODieKHs6G9fhGhwg6wRouMUTYC6a1ZspkNcPuo4WRqtckcF8eklhXH1 WQylEwYv+R4MzH7aiygLevhVIiJmFVHoOOdSLZEF8zd+rl3VPVMtvU3mAXakfc9aS9 qPuA1dsC7WUBg==
Hello all,
we just had a problem with networking on Previous. There was bad alignment in some structures. Finally the problem was caused by a bad definition of SIZEOF_VOID_P in slirp. It is defined to SIZEOF_CHAR_P which itself is defined in cpu/sysconfig.h:
#ifdef WIN64
....
#define SIZEOF_VOID_P 8
#else
#define SIZEOF_VOID_P 4
#endif
I suggest to change this to a more portable:
#if INTPTR_MAX == INT64_MAX
#define SIZEOF_VOID_P 8
#else
#define SIZEOF_VOID_P 4
#endif
Hatari is not affected immediately as it doesn’t use SLiRP, but this is a potential source of error anyway.
What do you think?
Best wishes,
Andreas