[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] char: Enable build of pty on macOS
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH] char: Enable build of pty on macOS |
Date: |
Wed, 22 Aug 2018 12:38:26 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 21/08/2018 20:29, Peter Maydell wrote:
>>
>> #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...
It's really looking only for qemu_openpty_raw, which in turn is compiled
for all CONFIG_POSIX systems. Because the file is already compiled for
CONFIG_POSIX only, the #ifdef is a legacy of the time before
chardev/char-pty.c was split out of qemu-char.c. It can be removed.
Paolo