Bug 1078 - [PATH] Fix header in order for "Android 21+" to use libserialport
Summary: [PATH] Fix header in order for "Android 21+" to use libserialport
Status: RESOLVED FIXED
Alias: None
Product: libserialport
Classification: Unclassified
Component: Portability (show other bugs)
Version: unreleased development snapshot
Hardware: All Android
: Normal normal
Target Milestone: ---
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-15 18:30 CET by Uwe Hermann
Modified: 2020-01-05 00:34 CET (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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!