[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] tools/libxendevicemodel: define O_CLOEXEC



commit d31828e348e7b7229d7ecb32f7f0bee7f125e61e
Author:     Olaf Hering <olaf@xxxxxxxxx>
AuthorDate: Wed Mar 1 12:27:08 2017 +0000
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Thu Mar 2 08:32:30 2017 +0000

    tools/libxendevicemodel: define O_CLOEXEC
    
    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@xxxxxxxxx>
    Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 tools/libs/devicemodel/linux.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/libs/devicemodel/linux.c b/tools/libs/devicemodel/linux.c
index 438c55b..0fdc712 100644
--- a/tools/libs/devicemodel/linux.c
+++ b/tools/libs/devicemodel/linux.c
@@ -31,6 +31,10 @@
 
 #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);
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.