From 13fa77f5cbbc7d5d717c3663512b904bba8c106c Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Fri, 6 Nov 2015 15:58:37 +0100 Subject: Fix build on Android x86 In the Android x86 NDK, the termios2 struct is already defined. On ARM, it isn't defined until android-21, which is not what we build against by default. We should probably look for a more robust solution to this, to support platforms where this is defined, but for now the main issue is fixing the build. Change-Id: I6084a90f664f9f778e6d1689106a3fb9a7ad0b2f Reviewed-by: Alex Blasche --- src/serialport/qserialport_unix.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/serialport/qserialport_unix.cpp b/src/serialport/qserialport_unix.cpp index ea2d697..7eb43a1 100644 --- a/src/serialport/qserialport_unix.cpp +++ b/src/serialport/qserialport_unix.cpp @@ -54,6 +54,7 @@ #ifdef Q_OS_LINUX +# if !defined(Q_OS_ANDROID) || !defined(Q_PROCESSOR_X86) struct termios2 { tcflag_t c_iflag; /* input mode flags */ tcflag_t c_oflag; /* output mode flags */ @@ -64,6 +65,7 @@ struct termios2 { speed_t c_ispeed; /* input speed */ speed_t c_ospeed; /* output speed */ }; +# endif #ifndef TCGETS2 #define TCGETS2 _IOR('T', 0x2A, struct termios2) -- cgit v1.2.1