summaryrefslogtreecommitdiffstats
path: root/contrib/qemu
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/qemu')
-rw-r--r--contrib/qemu/include/qemu/bswap.h2
-rw-r--r--contrib/qemu/util/oslib-posix.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/contrib/qemu/include/qemu/bswap.h b/contrib/qemu/include/qemu/bswap.h
index 1ea5b101e89..bf6457b8c46 100644
--- a/contrib/qemu/include/qemu/bswap.h
+++ b/contrib/qemu/include/qemu/bswap.h
@@ -11,6 +11,8 @@
# include <sys/endian.h>
# include <sys/types.h>
# include <machine/bswap.h>
+#elif defined(__FreeBSD__)
+# include <sys/endian.h>
#elif defined(CONFIG_BYTESWAP_H)
#ifdef GF_DARWIN_HOST_OS
# include <libkern/OSByteOrder.h>
diff --git a/contrib/qemu/util/oslib-posix.c b/contrib/qemu/util/oslib-posix.c
index 3dc8b1b0743..5dceea5f581 100644
--- a/contrib/qemu/util/oslib-posix.c
+++ b/contrib/qemu/util/oslib-posix.c
@@ -93,7 +93,7 @@ void *qemu_memalign(size_t alignment, size_t size)
size, strerror(ret));
abort();
}
-#elif defined(CONFIG_BSD)
+#elif defined(GF_BSD_HOST_OS)
ptr = qemu_oom_check(valloc(size));
#else
ptr = qemu_oom_check(memalign(alignment, size));
@@ -193,7 +193,7 @@ int qemu_utimens(const char *path, const struct timespec *times)
struct timeval tv[2], tv_now;
struct stat st;
int i;
-#ifdef CONFIG_UTIMENSAT
+#if defined(CONFIG_UTIMENSAT) && !defined(__FreeBSD__)
int ret;
ret = utimensat(AT_FDCWD, path, times, AT_SYMLINK_NOFOLLOW);