]> sigrok.org Git - libserialport.git/blobdiff - linux_termios.c
New API and implementation for blocking and non-blocking I/O.
[libserialport.git] / linux_termios.c
index b50b2c95d877aa78043db958bb98ceff86b1da4e..5343e6e8268f15253aa82fb2f6983b76427591f5 100644 (file)
@@ -33,6 +33,8 @@
  * TCSETX/TCGETX ioctls used with struct termiox, others do not.
  */
 
+#ifdef __linux__
+
 #include <linux/termios.h>
 #include "linux_termios.h"
 
@@ -97,8 +99,8 @@ int get_termiox_size(void)
 int get_termiox_flow(void *data)
 {
        struct termiox *termx = (struct termiox *) data;
-
        int flags = 0;
+
        if (termx->x_cflag & RTSXOFF)
                flags |= RTS_FLOW;
        if (termx->x_cflag & CTSXON)
@@ -127,3 +129,5 @@ void set_termiox_flow(void *data, int flags)
                termx->x_cflag |= DSRXON;
 }
 #endif
+
+#endif