diff mbox

[v2] qga/channel-posix.c: include headers it needs

Message ID 1352942371-8287-1-git-send-email-imammedo@redhat.com
State New
Headers show

Commit Message

Igor Mammedov Nov. 15, 2012, 1:19 a.m. UTC
From: Eduardo Habkost <ehabkost@redhat.com>

Include:
 - <errno.h> for errno
 - <unistd.h> & <fcntl.h> for fcntl()
 - "qemu-stdio.h" for qemu_open()

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: Igor Mammedov <imammedo@redhat.com>
---
v2
  - include qemu-common.h for EXIT_FAILURE, exit and qemu_open definitions
---
 qga/channel-posix.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Eduardo Habkost Nov. 15, 2012, 6:34 p.m. UTC | #1
On Thu, Nov 15, 2012 at 02:19:31AM +0100, Igor Mammedov wrote:
> From: Eduardo Habkost <ehabkost@redhat.com>
> 
> Include:
>  - <errno.h> for errno
>  - <unistd.h> & <fcntl.h> for fcntl()
>  - "qemu-stdio.h" for qemu_open()
> 
> 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: Igor Mammedov <imammedo@redhat.com>
> ---
> v2
>   - include qemu-common.h for EXIT_FAILURE, exit and qemu_open definitions

Thanks! The commit message above needs to be edited, too.  :-)

> ---
>  qga/channel-posix.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/qga/channel-posix.c b/qga/channel-posix.c
> index d152827..bbbbcc9 100644
> --- a/qga/channel-posix.c
> +++ b/qga/channel-posix.c
> @@ -1,7 +1,11 @@
>  #include <glib.h>
>  #include <termios.h>
> +#include <errno.h>
> +#include <unistd.h>
> +#include <fcntl.h>
>  #include "qemu_socket.h"
>  #include "qga/channel.h"
> +#include "qemu-common.h"
>  
>  #ifdef CONFIG_SOLARIS
>  #include <stropts.h>
> -- 
> 1.7.11.7
>
diff mbox

Patch

diff --git a/qga/channel-posix.c b/qga/channel-posix.c
index d152827..bbbbcc9 100644
--- a/qga/channel-posix.c
+++ b/qga/channel-posix.c
@@ -1,7 +1,11 @@ 
 #include <glib.h>
 #include <termios.h>
+#include <errno.h>
+#include <unistd.h>
+#include <fcntl.h>
 #include "qemu_socket.h"
 #include "qga/channel.h"
+#include "qemu-common.h"
 
 #ifdef CONFIG_SOLARIS
 #include <stropts.h>