TIOCINQ/TIOCOUTQ is not available everywhere.

E.g. on NetBSD TIOCINQ is not available, but FIONREAD seems to
do pretty much the same thing.
This commit is contained in:
Uwe Hermann 2013-12-01 18:04:24 +01:00
parent 2c827b2188
commit 6c8716e9da
1 changed files with 10 additions and 0 deletions

View File

@ -50,11 +50,21 @@
#include "libudev.h"
#include "linux/serial.h"
#include "linux_termios.h"
/* TCGETX/TCSETX is not available everywhere. */
#if defined(TCGETX) && defined(TCSETX) && defined(HAVE_TERMIOX)
#define USE_TERMIOX
#endif
#endif
/* TIOCINQ/TIOCOUTQ is not available everywhere. */
#if !defined(TIOCINQ) && defined(FIONREAD)
#define TIOCINQ FIONREAD
#endif
#if !defined(TIOCOUTQ) && defined(FIONWRITE)
#define TIOCOUTQ FIONWRITE
#endif
#ifndef _WIN32
#include "linux_termios.h"
#endif