* lib/linux/ioctl.c (ioctl3): New function.
* include/sys/ioctl.h: Declare it.
* lib/posix/isatty.c (__tcgetattr): Use it.
#define TCGETS 0x5401
#define TCGETA 0x5405
int ioctl (int fd, unsigned long request, ...);
#define TCGETS 0x5401
#define TCGETA 0x5405
int ioctl (int fd, unsigned long request, ...);
+int ioctl3 (int fd, unsigned long request, long data);
+
+int
+ioctl3 (int filedes, unsigned long command, long data)
+{
+ int r = _sys_call3 (SYS_ioctl, filedes, command, data);
+ return r;
+}
__tcgetattr (int filedes, struct termios *termios_p)
{
struct ktermios kernel_termios;
__tcgetattr (int filedes, struct termios *termios_p)
{
struct ktermios kernel_termios;
- int r = ioctl (filedes, TCGETS, &kernel_termios);
+ int r = ioctl3 (filedes, TCGETS, (long) &kernel_termios);
termios_p->c_iflag = kernel_termios.c_iflag;
termios_p->c_oflag = kernel_termios.c_oflag;
termios_p->c_iflag = kernel_termios.c_iflag;
termios_p->c_oflag = kernel_termios.c_oflag;