I realized that I need to #include iotcl.h as well in order to use TIOCMGET constant. If I want to run this small program continuously and detect the changes of the input pins all the time, can I simply use an infinite loop to do that? Does it anything wrong to the serial port? Thanks & Best Regards, Johnny Xing -----Original Message----- From: linux-serial-owner@xxxxxxxxxxxxxxx [mailto:linux-serial-owner@xxxxxxxxxxxxxxx] On Behalf Of Andreas Stricker Sent: 2008年10月6日 17:13 To: linux-serial@xxxxxxxxxxxxxxx Subject: Re: Help:Serial / Parallel Port Control Under Linux johnny schrieb: > serialIO.c:195: error: `TIOCMGET' undeclared (first use in this function) Did you include termios.h? (See `man ioctl_list`) Regards, Andy -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html