Fix for NetBSD

This commit is contained in:
NishiOwO
2025-03-23 00:42:51 +09:00
parent 81141c574c
commit 50e77917d5
6 changed files with 21 additions and 5 deletions

View File

@@ -20,6 +20,11 @@
#ifndef EMU_86BOX_H
#define EMU_86BOX_H
#ifdef __NetBSD__
/* Doesn't compile on NetBSD without this include */
#include <stdarg.h>
#endif
/* Configuration values. */
#define GFXCARD_MAX 2
#define SERIAL_MAX 7

View File

@@ -35,13 +35,12 @@
* USA.
*/
#ifndef __NetBSD__
#ifndef BSWAP_H
#define BSWAP_H
#include <stdint.h>
#ifndef __NetBSD__
#define bswap_16(x) \
((uint16_t)((((x) & 0x00ffu) << 8) | \
(((x) & 0xff00u) >> 8)))
@@ -91,6 +90,7 @@ bswap64(uint64_t x)
return bswap_16(x);
#endif
}
#endif
static __inline void
bswap16s(uint16_t *s)
@@ -241,5 +241,3 @@ cpu_to_be32wu(uint32_t *p, uint32_t v)
#undef be_bswaps
#endif /*BSWAP_H*/
#endif

View File

@@ -24,6 +24,11 @@
extern "C" {
# endif
#ifdef __NetBSD__
/* Doesn't compile on NetBSD without this include */
#include <stdarg.h>
#endif
#define LOG_SIZE_BUFFER 1024 /* Log size buffer */
#define LOG_SIZE_BUFFER_CYCLIC_LINES 32 /* Cyclic log size buffer (number of lines that should be cehcked) */
#define LOG_MINIMUM_REPEAT_ORDER 4 /* Minimum repeat size */