mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-05 05:42:42 +00:00
(svn r8613) -Fix [MorphOS]: offsetof() macro undefined for MorphOS build
This commit is contained in:
parent
7a685a35fc
commit
f801a5c04f
@ -311,9 +311,7 @@ assert_compile(sizeof(uint8) == 1);
|
||||
# define offsetof(s,m) (size_t)&(((s *)0)->m)
|
||||
#else /* __cplusplus */
|
||||
# define cpp_offsetof(s,m) (((size_t)&reinterpret_cast<const volatile char&>((((s*)(char*)8)->m))) - 8)
|
||||
# ifndef __MORPHOS__
|
||||
# define offsetof(s,m) cpp_offsetof(s, m)
|
||||
# endif /* !__MORPHOS__ */
|
||||
# define offsetof(s,m) cpp_offsetof(s, m)
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user