mirror of
git://sigrok.org/libserialport
synced 2023-08-10 21:13:24 +03:00
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:
parent
2c827b2188
commit
6c8716e9da
10
serialport.c
10
serialport.c
@ -50,11 +50,21 @@
|
|||||||
#include "libudev.h"
|
#include "libudev.h"
|
||||||
#include "linux/serial.h"
|
#include "linux/serial.h"
|
||||||
#include "linux_termios.h"
|
#include "linux_termios.h"
|
||||||
|
|
||||||
|
/* TCGETX/TCSETX is not available everywhere. */
|
||||||
#if defined(TCGETX) && defined(TCSETX) && defined(HAVE_TERMIOX)
|
#if defined(TCGETX) && defined(TCSETX) && defined(HAVE_TERMIOX)
|
||||||
#define USE_TERMIOX
|
#define USE_TERMIOX
|
||||||
#endif
|
#endif
|
||||||
#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
|
#ifndef _WIN32
|
||||||
#include "linux_termios.h"
|
#include "linux_termios.h"
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user