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