Re: [hatari-devel] Definition of SIZEOF_VOID_P

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


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



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/