xref: /third_party/ltp/include/lapi/ioctl.h (revision f08c3bdf)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright (c) 2020 Cyril Hrubis <chrubis@suse.cz>
4 * Copyright (c) 2020 Petr Vorel <pvorel@suse.cz>
5 */
6
7#ifndef LAPI_IOCTL_H__
8#define LAPI_IOCTL_H__
9
10#include "config.h"
11#include <sys/ioctl.h>
12
13/* musl not including it in <sys/ioctl.h> */
14#include <sys/ttydefaults.h>
15
16#ifndef TIOCVHANGUP
17# define TIOCVHANGUP 0x5437
18#endif
19
20#ifndef HAVE_STRUCT_TERMIO
21# ifndef NCC
22#  ifdef __powerpc__
23#   define NCC 10
24#  else
25#   define NCC 8
26#  endif
27# endif /* NCC */
28
29struct termio
30  {
31    unsigned short int c_iflag;		/* input mode flags */
32    unsigned short int c_oflag;		/* output mode flags */
33    unsigned short int c_cflag;		/* control mode flags */
34    unsigned short int c_lflag;		/* local mode flags */
35    unsigned char c_line;		/* line discipline */
36    unsigned char c_cc[NCC];		/* control characters */
37};
38#endif /* HAVE_STRUCT_TERMIO */
39
40#endif /* LAPI_IOCTL_H__ */
41