summaryrefslogtreecommitdiffstats
path: root/include/cutils/jstring.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/cutils/jstring.h')
-rw-r--r--include/cutils/jstring.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/cutils/jstring.h b/include/cutils/jstring.h
index ee0018f..a342608 100644
--- a/include/cutils/jstring.h
+++ b/include/cutils/jstring.h
@@ -24,7 +24,10 @@
extern "C" {
#endif
-typedef uint16_t char16_t;
+#if __STDC_VERSION__ < 201112L && __cplusplus < 201103L
+ typedef uint16_t char16_t;
+#endif
+ // otherwise char16_t is a keyword with the right semantics
extern char * strndup16to8 (const char16_t* s, size_t n);
extern size_t strnlen16to8 (const char16_t* s, size_t n);