Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android support #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

KevinRoebert
Copy link

This PR adds support (allows compilation) for Android. On Android the standard location is not <sys/termios.h>, instead <termios.h>.

The Android NDK has the __ANDROID__ macro that can be used (clang also) when used as a standalone toolchain, the Android.mk sets the ANDROID macro. So I've checked for both.

common/commonincludes.hpp Outdated Show resolved Hide resolved
@KevinRoebert
Copy link
Author

@jselbie any update?

@chuangqi
Copy link

chuangqi commented Jan 22, 2022 via email

#include <sys/termios.h>
#endif

Copy link
Owner

@jselbie jselbie Jan 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since has_include isn't standard, please wrap with macro to detect GCC/G++

#ifdef __GNUC__
#if __has_include(<termios.h>)
#include <termios.h>
#elif __has_include(<sys/termios.h>)
#include <sys/termios.h>
#endif
#else
#include <termios.h>
#endif

Repository owner deleted a comment from Neustradamus Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants