Fix type error (libslirp 32-bit)

This commit is contained in:
maron2000
2024-06-10 22:22:56 +09:00
parent b33321fc40
commit 647e6a9b4f
3 changed files with 9 additions and 3 deletions

View File

@@ -26,7 +26,7 @@ jobs:
with:
msystem: MINGW32
update: true
install: git make base-devel mingw-w64-i686-toolchain mingw-w64-i686-libtool mingw-w64-i686-nasm autoconf automake mingw-w64-i686-ncurses mingw-w64-i686-binutils
install: git make base-devel mingw-w64-i686-toolchain mingw-w64-i686-libtool mingw-w64-i686-nasm autoconf automake mingw-w64-i686-ncurses mingw-w64-i686-binutils mingw-w64-i686-libslirp
- name: Install libslirp
if: false
run: |

View File

@@ -179,7 +179,7 @@ jobs:
with:
msystem: MINGW32
update: true
install: git mingw-w64-i686-toolchain mingw-w64-i686-libtool mingw-w64-i686-nasm autoconf automake
install: git mingw-w64-i686-toolchain mingw-w64-i686-libtool mingw-w64-i686-nasm autoconf automake mingw-w64-i686-libslirp
- name: Update build info
shell: bash
run: |

View File

@@ -56,7 +56,13 @@ int inet_pton_win(int af, const char* src, void* dst)
* object. This is done by passing our SlirpEthernetConnection as user data.
*/
ssize_t slirp_receive_packet(const void* buf, size_t len, void* opaque)
// libslirp >= 4.8.0 defines slirp_ssize_t but will break compatibility with older versions
#ifdef _WIN32
SSIZE_T
#else
ssize_t
#endif
slirp_receive_packet(const void* buf, size_t len, void* opaque)
{
SlirpEthernetConnection* conn = (SlirpEthernetConnection*)opaque;
conn->ReceivePacket((const uint8_t*)buf, len);