Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1jSpZl-000678-GV for mharc-qemu-trivial@gnu.org; Sun, 26 Apr 2020 18:16:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60718) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSoZg-0000Bu-Qn for qemu-trivial@nongnu.org; Sun, 26 Apr 2020 17:12:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jSoZg-00067X-GC for qemu-trivial@nongnu.org; Sun, 26 Apr 2020 17:12:28 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:38145) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jSoZe-00061P-GD; Sun, 26 Apr 2020 17:12:26 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id D11FC5C0118; Sun, 26 Apr 2020 17:12:23 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Sun, 26 Apr 2020 17:12:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dottedmag.net; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm2; bh=zgV7/9k3Hto6rUVeJ6s8ZLt/qf Ekaj7t1R0wnIL3X6o=; b=PeZEBz7+eJbhoBUDGw9nt13MTe6nMKvZ2hxgCNRYfL Y7is5YTkSymjYSYwWcmiz5s3zeJuFGu3/xccky738FMhjGHD0WjF1M4lhrU1PpDn RnuK8sR8USmeLsayBjMpowYavI/NX0vJxOflwwGV2NqgcYLZ7aFpWe6fT9lT5bFl gPsN+SZCFJmG0pNFqPHJ0479f20NyE8FWlQGJIo/uNXcGRV9JzSJHgy+Fh4ZWQTF F344rF9Em6T6sUbktWra53duMGA9E3/j5sKZa8NVMaxywg0PcpGODKCLE5jCkQ11 L6iL+ELZ2kgtOF1GEoOHreAzQwbeU6d/IM1GyPtgD4KQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=zgV7/9k3Hto6rUVeJ 6s8ZLt/qfEkaj7t1R0wnIL3X6o=; b=mkWyZJMQhA9Xzp9PlXDax5ssqYKu3jkAC QNPDoMD7U/qyLLInkOlTWYC5un7hmEF1yJyEz1AfHh/zzszM3esdujoSSBjovXAc CrYwmIBAizCYjTEyyE3kyzfNZvorSwbaa/3Ag709aM5vIlnLGSfozSjk2sKagsX0 z619rrCnU9GXgAFkVZCNnBJeUHec5eIMaaQe/Lco9aAKGoKDK7gGlXx2ZFocfYMA g5oDPD+d00o/GUiTeswIUAfEzXZz1IEcMeaAB4Cr1/Rr+wjCiUdfU65Oh56klnYQ nzDxP0nG0OIlU5TdplGHz14Qfz+ThrBtZX1Hlz5/yA2WfzDe7BJWw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrheejgdduheelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgggfestdekredtre dttdenucfhrhhomhepofhikhhhrghilhcuifhushgrrhhovhcuoeguohhtthgvughmrghg seguohhtthgvughmrghgrdhnvghtqeenucfkphepledvrddvhedurdefgedrvddvkeenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpeguohhtthgv ughmrghgseguohhtthgvughmrghgrdhnvght X-ME-Proxy: Received: from newton.malta.dottedmag.net (c34-228.i07-9.onvol.net [92.251.34.228]) by mail.messagingengine.com (Postfix) with ESMTPA id 566AE3280067; Sun, 26 Apr 2020 17:12:23 -0400 (EDT) Received: by newton.malta.dottedmag.net (Postfix, from userid 501) id 2654F2CE1CF5; Sun, 26 Apr 2020 23:12:20 +0200 (CEST) From: Mikhail Gusarov To: qemu-devel@nongnu.org Cc: Mikhail Gusarov , qemu-trivial@nongnu.org Subject: [PATCH] chardev: Add macOS to list of OSes that support -chardev serial Date: Sun, 26 Apr 2020 23:09:58 +0200 Message-Id: <20200426210956.17324-1-dottedmag@dottedmag.net> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=66.111.4.25; envelope-from=dottedmag@dottedmag.net; helo=out1-smtp.messagingengine.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/26 17:12:23 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.25 X-Mailman-Approved-At: Sun, 26 Apr 2020 18:16:35 -0400 X-BeenThere: qemu-trivial@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2020 21:12:29 -0000 macOS API for dealing with serial ports/ttys is identical to BSDs. Signed-off-by: Mikhail Gusarov --- Note that the same file has a line > #endif /* linux || sun */ that is severely out of date. chardev/char-serial.c | 2 +- include/qemu/osdep.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/chardev/char-serial.c b/chardev/char-serial.c index 5b833ea077..7c3d84ae24 100644 --- a/chardev/char-serial.c +++ b/chardev/char-serial.c @@ -53,7 +53,7 @@ static void qmp_chardev_open_serial(Chardev *chr, #elif defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) \ || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) \ - || defined(__GLIBC__) + || defined(__GLIBC__) || defined(__APPLE__) static void tty_serial_init(int fd, int speed, int parity, int data_bits, int stop_bits) diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 20f5c5f197..ff7c17b857 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -379,7 +379,7 @@ void qemu_anon_ram_free(void *ptr, size_t size); #define HAVE_CHARDEV_SERIAL 1 #elif defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) \ || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) \ - || defined(__GLIBC__) + || defined(__GLIBC__) || defined(__APPLE__) #define HAVE_CHARDEV_SERIAL 1 #endif -- 2.19.1