]> xenbits.xensource.com Git - xen.git/commitdiff
tools/libxendevicemodel: define O_CLOEXEC
authorOlaf Hering <olaf@aepfle.de>
Wed, 1 Mar 2017 12:27:08 +0000 (12:27 +0000)
committerWei Liu <wei.liu2@citrix.com>
Thu, 2 Mar 2017 08:32:30 +0000 (08:32 +0000)
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>
tools/libs/devicemodel/linux.c

index 438c55bf2c3a81349db0459f416155b44e4659f4..0fdc7121f1eb7707f1f330577c9f4a2c948199f9 100644 (file)
 
 #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);