Saturday 15 January 2011

linux - C++ compilation error: request for member ‘c_cflag' in something not a structure or union -


I am trying to compile a cp210x USB-UART driver on Debian 7 and upon receiving the following error (when the command ):

  /var/distr/sillabs/Linux_3.x.x_VCP_Driver_Source/cp210x.cms89:17: Error: Request for member 'c_cflag' in some 'structure' or association < / Code> 

This is a piece of code, starting with line 589 (& amp; tty->), cp210x.c:

  static zero cp210x_get_termios (Struct tty_struct * tty, struct usb_serial_port * port) {unsigned int baud; If (TTI) {cp210x_get_termios_port (tty-> driver_data, & amp; tty-> termios.c_cflag, and baud); Tty_encode_baud_rate (TTI, baud, baud); } Other {unsigned int cflag; Seagull = 0; Cp210x_get_termios_port (port, & amp; cflag, and baud); }}  

I think that & amp; Tty-> termios.c_cflag is something wrong with the construction. Please, how do I fix it?

Thank you!

This means that its definition of Tty_struct, termios is a structure indicator, not a structure. You need to change the expression

  and tty-> termios.c_cflag  

to

  and tty -> gt; ; Termos-> C_cflag  

No comments:

Post a Comment