]> sigrok.org Git - libserialport.git/blobdiff - linux_termios.c
Check return value of GetOverlappedResult().
[libserialport.git] / linux_termios.c
index b50b2c95d877aa78043db958bb98ceff86b1da4e..328c4d39b4024bc06fc218a52a69e7ac2cbd079c 100644 (file)
@@ -33,6 +33,8 @@
  * TCSETX/TCGETX ioctls used with struct termiox, others do not.
  */
 
+#if defined(__linux__) && !defined(__ANDROID__)
+
 #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