tools/xenstored: xenstored_core.h should include fcntl.h
authorJulien Grall <jgrall@amazon.com>
Thu, 24 Jun 2021 08:07:52 +0000 (09:07 +0100)
committerJulien Grall <jgrall@amazon.com>
Thu, 24 Jun 2021 08:07:52 +0000 (09:07 +0100)
xenstored_core.h will consider live-udpate is not supported if
O_CLOEXEC doesn't exist. However, the header doesn't include the one
defining O_CLOEXEC (i.e. fcntl.h). This means that depending on
the header included, some source file will think Live-Update is not
supported.

I am not aware of any issue with the existing. Therefore this is just
a latent bug so far.

Prevent any potential issue by including fcntl.h in xenstored_core.h

Fixes: cd831ee438 ("tools/xenstore: handle CLOEXEC flag for local files and pipes")
Signed-off-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Luca Fancellu <luca.fancellu@arm.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
tools/xenstore/xenstored_core.h

index 34839b34f6e96544201c152239c07628278d2f84..dac517156993493809d917e6d96c2ad280092f51 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <sys/types.h>
 #include <dirent.h>
+#include <fcntl.h>
 #include <stdbool.h>
 #include <stdint.h>
 #include <errno.h>