summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--time64.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/time64.h b/time64.h
index 07bb33fd84..cea1be9ed1 100644
--- a/time64.h
+++ b/time64.h
@@ -28,11 +28,13 @@ struct TM64 {
#endif
#ifdef HAS_TM_TM_ZONE
-# ifdef __GLIBC__
- const char *tm_zone;
-# else
- char *tm_zone;
+/* If glibc is defined, use const. Otherwise,
+ * if we are on android, use const but not with g++
+ */
+# if defined(__GLIBC__) || (defined(__ANDROID__) && !defined(__cplusplus))
+ const
# endif
+ char *tm_zone;
#endif
};