Some libc headers don't have O_CLOEXEC, we need to take care of it by
defining to 0 (on the ground that such glibc might barf on O_CLOEXEC).
Fixes
e7745d8ef5 ("tools/libxendevicemodel: introduce a Linux-specific
implementation")
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Wei Liu <wei.liu2@citrix.com>
#include "private.h"
+#ifndef O_CLOEXEC
+#define O_CLOEXEC 0
+#endif
+
int osdep_xendevicemodel_open(xendevicemodel_handle *dmod)
{
int fd = open("/dev/xen/privcmd", O_RDWR | O_CLOEXEC);