Bug 1078

Summary: [PATH] Fix header in order for "Android 21+" to use libserialport
Product: libserialport Reporter: Uwe Hermann <uwe>
Component: PortabilityAssignee: Nobody <nobody>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unreleased development snapshot   
Target Milestone: ---   
Hardware: All   
OS: Android   

Description Uwe Hermann 2017-12-15 18:30:08 CET
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"
Comment 1 Uwe Hermann 2020-01-05 00:34:10 CET
This was fixed in abd31fd9f99f225d11f9df1ae33f93a419c9d24d, thanks!