X-Git-Url: https://repo.jachan.dev/qemu.git/blobdiff_plain/aba8e41e8666e4c0287cef1f6298985d4e03211d..fe1755cbb21c34a40234e2c380d049b9b031c4e2:/osdep.h diff --git a/osdep.h b/osdep.h index 428285c7e0..cb213e0295 100644 --- a/osdep.h +++ b/osdep.h @@ -3,6 +3,7 @@ #include #include +#include #ifdef __OpenBSD__ #include #include @@ -10,6 +11,13 @@ #include +#if defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10 +/* [u]int_fast*_t not in */ +typedef unsigned char uint_fast8_t; +typedef unsigned int uint_fast16_t; +typedef signed int int_fast16_t; +#endif + #ifndef glue #define xglue(x, y) x ## y #define glue(x, y) xglue(x, y) @@ -63,10 +71,12 @@ #ifndef always_inline #if !((__GNUC__ < 3) || defined(__APPLE__)) #ifdef __OPTIMIZE__ +#undef inline #define inline __attribute__ (( always_inline )) __inline__ #endif #endif #else +#undef inline #define inline always_inline #endif @@ -93,6 +103,11 @@ void qemu_vfree(void *ptr); #else #define QEMU_MADV_MERGEABLE QEMU_MADV_INVALID #endif +#ifdef MADV_DONTDUMP +#define QEMU_MADV_DONTDUMP MADV_DONTDUMP +#else +#define QEMU_MADV_DONTDUMP QEMU_MADV_INVALID +#endif #elif defined(CONFIG_POSIX_MADVISE) @@ -100,6 +115,7 @@ void qemu_vfree(void *ptr); #define QEMU_MADV_DONTNEED POSIX_MADV_DONTNEED #define QEMU_MADV_DONTFORK QEMU_MADV_INVALID #define QEMU_MADV_MERGEABLE QEMU_MADV_INVALID +#define QEMU_MADV_DONTDUMP QEMU_MADV_INVALID #else /* no-op */ @@ -107,6 +123,7 @@ void qemu_vfree(void *ptr); #define QEMU_MADV_DONTNEED QEMU_MADV_INVALID #define QEMU_MADV_DONTFORK QEMU_MADV_INVALID #define QEMU_MADV_MERGEABLE QEMU_MADV_INVALID +#define QEMU_MADV_DONTDUMP QEMU_MADV_INVALID #endif @@ -142,4 +159,10 @@ static inline void qemu_timersub(const struct timeval *val1, void qemu_set_cloexec(int fd); +void qemu_set_version(const char *); +const char *qemu_get_version(void); + +void fips_set_state(bool requested); +bool fips_get_state(void); + #endif