From 7ddf6bcbfdc66855b594afaaacdc4998177f2286 Mon Sep 17 00:00:00 2001 From: Margaret Lewicka Date: Fri, 6 Feb 2015 10:01:28 +0000 Subject: [PATCH] macosx: Include and define SOCK_* for Mac OS X. --- src/launch-libvirt.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c index 5a4328c8e..d670e79c1 100644 --- a/src/launch-libvirt.c +++ b/src/launch-libvirt.c @@ -57,6 +57,18 @@ #include "guestfs-internal-actions.h" #include "guestfs_protocol.h" +/* Fixes for Mac OS X */ +#if defined __APPLE__ && defined __MACH__ +#include +#endif +#ifndef SOCK_CLOEXEC +# define SOCK_CLOEXEC O_CLOEXEC +#endif +#ifndef SOCK_NONBLOCK +# define SOCK_NONBLOCK O_NONBLOCK +#endif +/* End of fixes for Mac OS X */ + /* Check minimum required version of libvirt. The libvirt backend * is new and not the default, so we can get away with forcing * people who want to try it to have a reasonably new version of