From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 9CAFD1F8C6 for ; Fri, 30 Jul 2021 13:06:27 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A74613851C29 for ; Fri, 30 Jul 2021 13:06:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A74613851C29 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1627650386; bh=eh7yXlywzfzPraS/JBtgWB1StNGVnfZXDoc0Kddgja8=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=IeFA8Xk5iUrBQ8LVFMIlgXmha0Ukae3oA6Rap4JN7pXt3a5R0CW6+Gw84Lb26CYCt /XoWNvGYeA6D1Eh5tYIBxfp8t6ffo4sj2MS0Ngbut+xr6eWjmgYqJOVB9B+Hq8zN09 CYNp3f7C7nwnllFUAaMb+MURdIqL9V5HnR3YzR9k= Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by sourceware.org (Postfix) with ESMTPS id 26258385E019 for ; Fri, 30 Jul 2021 13:06:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 26258385E019 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0A2E660240; Fri, 30 Jul 2021 13:06:04 +0000 (UTC) Received: by pali.im (Postfix) id 94CFF772; Fri, 30 Jul 2021 15:06:01 +0200 (CEST) To: linux-man@vger.kernel.org, Alejandro Colomar , Michael Kerrisk Subject: [PATCH v2] ioctl_tty.2: Fix information about header include file Date: Fri, 30 Jul 2021 15:05:37 +0200 Message-Id: <20210730130537.18863-1-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210730105353.10424-1-pali@kernel.org> References: <20210730105353.10424-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: , From: =?utf-8?q?Pali_Roh=C3=A1r_via_Libc-alpha?= Reply-To: =?UTF-8?q?Pali=20Roh=C3=A1r?= Cc: =?UTF-8?q?Marek=20Beh=C3=BAn?= , "G. Branden Robinson" , libc-alpha@sourceware.org Errors-To: libc-alpha-bounces+e=80x24.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 --- Changes in v2: * Reformat SYNOPSIS for 80 chars per line --- man2/ioctl_tty.2 | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/man2/ioctl_tty.2 b/man2/ioctl_tty.2 index 771a9a470bf0..ecbae4f887c4 100644 --- a/man2/ioctl_tty.2 +++ b/man2/ioctl_tty.2 @@ -11,8 +11,10 @@ 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" , +.BR " struct termios2" ", and" +.BR " Bnn" ", " BOTHER ", " CBAUD ", " CLOCAL , +.BR " TC*" { FLUSH , ON , OFF "} and other constants */" .PP .BI "int ioctl(int " fd ", int " cmd ", ...);" .fi @@ -31,6 +33,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 -- 2.20.1