Got this from QIU1995NONAME <292529702@qq.com> via email without any additional comment, dumping here until someone can review/test it: diff --git a/libserialport_internal.h b/libserialport_internal.h index 6ea5e5a..17dc678 100644 - --- a/libserialport_internal.h +++ b/libserialport_internal.h @@ -63,7 +63,7 @@ #endif #ifdef __linux__ #include <dirent.h> - -#ifndef __ANDROID__ +#if __ANDROID_API__ >= 21 #include "linux/serial.h" #endif #include "linux_termios.h"
This was fixed in abd31fd9f99f225d11f9df1ae33f93a419c9d24d, thanks!