Android: Fix compilation on Necessitas Qt SDK v 1.0.0
It is the first experimental patch to start integration of support of
Android for QtSerialPort. Therefore for build of library it is necessary
to exclude examples and tests.
In this patch was corrected the tcdrain() function. The main problem is
that Android supports this function, beginning from version 4.2 and above:
* https://android.googlesource.com/platform/bionic/+/android-4.2_r1/libc/include/termios.h
I.e. for support of this function the Android API Level shall be more or
is equal 17, see:
* http://developer.android.com/guide/topics/manifest/uses-sdk-element.html
Therefore for the smaller API levels we are stimulated to implement the
tcdrain() function manually, having simply copied its implementation from
the source codes of Bionic libc.
Task-number: QTBUG-33117
Change-Id: I05b5765a4044d24358a07d60bca1ef32b35f9630
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>