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