summaryrefslogtreecommitdiffstats
path: root/os.h
diff options
context:
space:
mode:
Diffstat (limited to 'os.h')
-rw-r--r--os.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/os.h b/os.h
index 2e6dbaa..e5f72e4 100644
--- a/os.h
+++ b/os.h
@@ -58,6 +58,11 @@
#define __FLASHROM_OS__ "libpayload"
// Linux
#elif defined(__linux__)
-#define __FLASHROM_OS__ "Linux"
+ // There are various flags in use on Android apparently. __ANDROID__ seems to be the most trustworthy.
+ #if defined(__ANDROID__)
+ #define __FLASHROM_OS__ "Android"
+ #else
+ #define __FLASHROM_OS__ "Linux"
+ #endif
#endif
__FLASHROM_OS__
OpenPOWER on IntegriCloud