From patchwork Fri Jul 30 10:53:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 44515 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A1E76393D00E for ; Fri, 30 Jul 2021 10:54:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A1E76393D00E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1627642482; bh=7ZN+TsE93esdknb3F1lU2gD1H3oHz4Ole/bohJDOcso=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=pD0kRUPjpmMrbj8L7KZhcyy9zH25CMWDIvLFuZYTit5+SkpT/NlCrgzwLQf7mlqhM trqwJauq3g63PqtU6spxgvt30BEQjAktc7nIaTm9IvLLbfpw+L8qbLcPSSKWfNSo8z Qyo7EMNERBKmt4kJ2AjBjWD5a00YJsmQCXo4D0BU= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by sourceware.org (Postfix) with ESMTPS id BE1203860C36 for ; Fri, 30 Jul 2021 10:54:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BE1203860C36 Received: by mail.kernel.org (Postfix) with ESMTPSA id B377560EFD; Fri, 30 Jul 2021 10:54:19 +0000 (UTC) Received: by pali.im (Postfix) id 998E0772; Fri, 30 Jul 2021 12:54:17 +0200 (CEST) To: linux-man@vger.kernel.org, Alejandro Colomar , Michael Kerrisk Subject: [PATCH] ioctl_tty.2: Fix information about header include file Date: Fri, 30 Jul 2021 12:53:53 +0200 Message-Id: <20210730105353.10424-1-pali@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Spam-Status: No, score=-13.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: =?utf-8?q?Pali_Roh=C3=A1r_via_Libc-alpha?= From: =?utf-8?q?Pali_Roh=C3=A1r?= Reply-To: =?utf-8?q?Pali_Roh=C3=A1r?= Cc: =?utf-8?q?Marek_Beh=C3=BAn?= , libc-alpha@sourceware.org Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" Header file termios.h contains incompatible definitions for linux ioctl calls. Correct definitions are exported by header file linux/termios.h but this file conflicts with sys/ioctl.h header file (required for ioctl() call). Therefore include direct asm header file asm/termbits.h which contains compatible definitions and structures for ioctl calls. Signed-off-by: Pali Rohár --- man2/ioctl_tty.2 | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/man2/ioctl_tty.2 b/man2/ioctl_tty.2 index c1875530f0b1..91aceddb7828 100644 --- a/man2/ioctl_tty.2 +++ b/man2/ioctl_tty.2 @@ -11,8 +11,8 @@ ioctl_tty \- ioctls for terminals and serial lines .SH SYNOPSIS .nf .B #include -.BR "#include " " /* Definition of " CLOCAL ", and" -.BR " TC*" { FLUSH , ON , OFF "} constants */" +.BR "#include " " /* Definition of " struct " " termios ", " struct " " termios2 "," +.BR " " " " BOTHER ", " CLOCAL ", and " TC* { FLUSH , ON , OFF "} constants */" .PP .BI "int ioctl(int " fd ", int " cmd ", ...);" .fi @@ -31,6 +31,19 @@ makes for nonportable programs. Use the POSIX interface described in .BR termios (3) whenever possible. +.PP +Please note that +.B struct termios +from +.B #include +is different and incompatible with +.B struct termios +from +.BR "#include " . +These ioctl calls require +.B struct termios +from +.BR "#include " . .SS Get and set terminal attributes .TP .B TCGETS