mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 20:45:18 +00:00
src: ensure O_CLOEXEC is defined on Windows
Windows uses _O_NOINHERIT as the name for its O_CLOEXEC equivalent. Define O_CLOEXEC to match this to fix portability when we remove GNULIB. Reviewed-by: Pavel Hrdina <phrdina@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
18dca21a32
commit
2a656fc9d8
@ -89,6 +89,12 @@
|
||||
|
||||
#define NUL_TERMINATE(buf) do { (buf)[sizeof(buf)-1] = '\0'; } while (0)
|
||||
|
||||
#ifdef WIN32
|
||||
# ifndef O_CLOEXEC
|
||||
# define O_CLOEXEC _O_NOINHERIT
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* G_GNUC_NO_INLINE:
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user