aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/svg/parser/SkSVGAttribute.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/svg/parser/SkSVGAttribute.h')
-rw-r--r--include/svg/parser/SkSVGAttribute.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/svg/parser/SkSVGAttribute.h b/include/svg/parser/SkSVGAttribute.h
index 940ca5a951..5ba2916b74 100644
--- a/include/svg/parser/SkSVGAttribute.h
+++ b/include/svg/parser/SkSVGAttribute.h
@@ -20,7 +20,8 @@ struct SkSVGAttribute {
};
#ifndef SK_OFFSETOF
-#define SK_OFFSETOF(a, b) (((size_t) (&(((a*) 1)->b)))-1)
+ // This is offsetof for types which are not standard layout.
+ #define SK_OFFSETOF(type, field) (size_t)((char*)&(((type*)1024)->field) - (char*)1024)
#endif
#ifdef SK_DEBUG