Re: [hatari-devel] Definition of SIZEOF_VOID_P |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx, Andreas Grabher <andreas_g86@xxxxxxxxxx>, twilen@xxxxxxxxxx
- Subject: Re: [hatari-devel] Definition of SIZEOF_VOID_P
- From: Thomas Huth <th.huth@xxxxxxxxx>
- Date: Tue, 14 Feb 2023 20:48:33 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1676407715; bh=3nn6L6Bu2hQm43Hu/vZGQ1znOTPehn992tEcOgcV9eI=; h=Date:Subject:To:From:From; b=eAe6fxfj9q+bkr/HHE4bLflQ3dB7Kl+8m9xyieJ9huEI76FmsmRaJBc7LVJcbnqZi YpUbdRZ1s4Gp72kR1foeWvy4aDn/wUP1UnaBd6f+slkRYGpF2dzq9iThViqQ+sNFYj MQSJkTMU6Wgs8z9Eqyrl3Bcmzr9Oo5h0SnfzId2VbOqSmylvVNlyZ3O1M3MS4X8ab+ IIx8hcXCgiDQDCLEQi4D620rG4X7JsioxgTf1XrRF+lwhlYQcJ6gfw5zL/nhqesf4L d4wnsx/pVFEFyIRwwJr+iS+9TatgfOuqP96xp4UVVTVDDRQnV5Z9/48TnzxXRj0sak o41ab1KSq6LSw==
On 14/02/2023 21.03, Andreas Grabher wrote:
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?
Why do you still maintain your own version of slirp instead of using the
official libslirp library? See:
https://gitlab.freedesktop.org/slirp/libslirp
There should be precompiled packages for every normal distro nowadays,
including Homebrew and MacPorts for macOS, see:
https://repology.org/project/libslirp/versions
HTH,
Thomas