[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] char: Enable build of pty on macOS
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH] char: Enable build of pty on macOS |
Date: |
Tue, 21 Aug 2018 19:29:19 +0100 |
On 21 August 2018 at 18:23, Roman Bolshakov <address@hidden> wrote:
> For some reason __APPLE__ was not checked in pty code. pty chardev
> should be available on macOS, according to man page.
>
> Signed-off-by: Roman Bolshakov <address@hidden>
> ---
> chardev/char-pty.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/chardev/char-pty.c b/chardev/char-pty.c
> index 68fd4e20c3..cb00257ebe 100644
> --- a/chardev/char-pty.c
> +++ b/chardev/char-pty.c
> @@ -33,7 +33,7 @@
>
> #if defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) \
> || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
> \
> - || defined(__GLIBC__)
> + || defined(__GLIBC__) || defined(__APPLE__)
We should fix this by figuring out what the code is actually looking
for (ie what OS functions), having a configure test for those
functions, and dropping the big long list of OS ifdefs. Otherwise
we've just got exactly the same problem for the next unix-ish
OS that comes along...
thanks
-- PMM