Patchwork [for-1.5] portability: pty.h is glibc-specific

login
register
mail settings
Submitter Brad
Date May 14, 2013, 6:30 p.m.
Message ID <20130514183025.GJ25411@rox.home.comstyle.com>
Download mbox | patch
Permalink /patch/243797/
State New
Headers show

Comments

Brad - May 14, 2013, 6:30 p.m.
On Tue, May 14, 2013 at 02:05:21PM +0200, Paolo Bonzini wrote:
> This should fix building the GTK+ front-end on BSDs.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  include/qemu-common.h | 12 ++++++++++++
>  qemu-char.c           | 10 ----------
>  ui/gtk.c              |  1 -
>  3 files changed, 12 insertions(+), 11 deletions(-)

This actually fixes the build on *BSD and OS X systems.
Peter Maydell - May 14, 2013, 9:06 p.m.
On 14 May 2013 19:30, Brad Smith <brad@comstyle.com> wrote:
> On Tue, May 14, 2013 at 02:05:21PM +0200, Paolo Bonzini wrote:
>> This should fix building the GTK+ front-end on BSDs.
>>
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>> ---
>>  include/qemu-common.h | 12 ++++++++++++
>>  qemu-char.c           | 10 ----------
>>  ui/gtk.c              |  1 -
>>  3 files changed, 12 insertions(+), 11 deletions(-)
>
> This actually fixes the build on *BSD and OS X systems.
>
>
> diff --git a/include/qemu-common.h b/include/qemu-common.h
> index af769f5..c944bb7 100644
> --- a/include/qemu-common.h
> +++ b/include/qemu-common.h
> @@ -45,6 +45,7 @@
>  #if defined(__GLIBC__)
>  # include <pty.h>
>  #elif defined CONFIG_BSD
> +# include <termios.h>
>  # if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
>  #  include <libutil.h>
>  # else
>

This is going to need a Signed-off-by: if you want it to be
applied (and ideally to be a properly formatted git patch
that can be automatically applied, with a "for-1.5" tag
and cc'ing Anthony).

(I can't test it myself because my MacOSX system doesn't
have GTK so I don't build the GTK frontend anyway; it
doesn't actively break the MacOSX build, at least.)

thanks
-- PMM

Patch

diff --git a/include/qemu-common.h b/include/qemu-common.h
index af769f5..c944bb7 100644
--- a/include/qemu-common.h
+++ b/include/qemu-common.h
@@ -45,6 +45,7 @@ 
 #if defined(__GLIBC__)
 # include <pty.h>
 #elif defined CONFIG_BSD
+# include <termios.h>
 # if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
 #  include <libutil.h>
 # else