Various improvements & Cleanups

Some ported from ANightly's work
This commit is contained in:
Jasmine Iwanek
2025-01-11 18:13:56 -05:00
parent 4ed7fec6a5
commit fabe71150c
29 changed files with 178 additions and 140 deletions

View File

@@ -41,7 +41,10 @@ pkg_check_modules(SLIRP REQUIRED IMPORTED_TARGET slirp)
target_link_libraries(86Box PkgConfig::SLIRP)
if(WIN32)
target_link_libraries(PkgConfig::SLIRP INTERFACE wsock32 ws2_32 iphlpapi iconv)
target_link_libraries(PkgConfig::SLIRP INTERFACE wsock32 ws2_32 iphlpapi)
if (NOT MSVC)
target_link_libraries(PkgConfig::SLIRP INTERFACE iconv)
endif()
if(STATIC_BUILD)
add_compile_definitions(LIBSLIRP_STATIC)
endif()

View File

@@ -28,6 +28,9 @@
#include <stdbool.h>
#include <string.h>
#include <stdio.h>
#ifdef _MVC_VER
#include <stddef.h>
#endif
#include <time.h>
#define HAVE_STDARG_H
#include <86box/86box.h>
@@ -531,14 +534,14 @@ rtl8139_write_buffer(RTL8139State *s, const void *buf, int size)
if (size > wrapped) {
dma_bm_write(s->RxBuf + s->RxBufAddr,
buf, size - wrapped, 1);
(uint8_t *) buf, size - wrapped, 1);
}
/* reset buffer pointer */
s->RxBufAddr = 0;
dma_bm_write(s->RxBuf + s->RxBufAddr,
buf + (size - wrapped), wrapped, 1);
(uint8_t *) buf + (size - wrapped), wrapped, 1);
s->RxBufAddr = wrapped;

View File

@@ -54,7 +54,9 @@
#include <stdlib.h>
#include <wchar.h>
#include <time.h>
#ifndef _MSC_VER
#include <sys/time.h>
#endif
#include <stdbool.h>
#define HAVE_STDARG_H
#include <86box/86box.h>