Fix compilation with older sdk

This commit is contained in:
Shinovon 2026-05-01 14:34:05 +05:00
parent 52e1b18729
commit 9adfa881b3
5 changed files with 16 additions and 8 deletions

View file

@ -112,8 +112,13 @@ struct LLLink
}
};
#ifndef RW_GL3
#define __offsetof(type, field) (reinterpret_cast <size_t> \
(&reinterpret_cast <const volatile char &> \
(static_cast<type *> (0)->field)))
#endif
#define LLLinkGetData(linkvar,type,entry) \
((type*)(((rw::uint8*)(linkvar))-offsetof(type,entry)))
((type*)(((rw::uint8*)(linkvar))-offsetof(type,entry)))
// Have to be careful since the link might be deleted.
#define FORLIST(_link, _list) \