diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> | 2015-11-06 15:58:37 +0100 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@theqtcompany.com> | 2015-11-06 21:27:15 +0000 |
commit | 13fa77f5cbbc7d5d717c3663512b904bba8c106c (patch) | |
tree | 137f1a6d54e161971b8932ed25a793b6d47cc07f | |
parent | 2575d33fab4042baba67384f92119c58c0ce0245 (diff) | |
download | qtserialport-13fa77f5cbbc7d5d717c3663512b904bba8c106c.tar.gz |
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 <alexander.blasche@theqtcompany.com>
-rw-r--r-- | src/serialport/qserialport_unix.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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) |