[5/8] qga/channel-posix.c: Include headers it needs

Message ID 1353605251-22218-6-git-send-email-ehabkost@redhat.com
State New
Headers show

Commit Message

Eduardo Habkost Nov. 22, 2012, 5:27 p.m.
 - <errno.h> for errno
 - <unistd.h> & <fcntl.h> for fcntl()
 - "osdep.h" for qemu_open()
 - <stdlib.h> for exit()

Some of those headers were probably being included by accident because
some other headers were including qemu-common.h, but those headers
should eventually stop including qemu-common.h.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
     qemu-common.h indirectly provided definition for exit(),
     so when replacing it with "osdep.h" add explicitly <stdlib.h>
     for exit()
 qga/channel-posix.c | 5 +++++
 1 file changed, 5 insertions(+)


diff --git a/qga/channel-posix.c b/qga/channel-posix.c
index d152827..769a559 100644
--- a/qga/channel-posix.c
+++ b/qga/channel-posix.c
@@ -1,5 +1,10 @@ 
 #include <glib.h>
 #include <termios.h>
+#include <errno.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include "osdep.h"
 #include "qemu_socket.h"
 #include "qga/channel.h"