[PATCH 1/1] include: types: Use __builtin_offsetof when supported

Jessica Clarke jrtc27 at jrtc27.com
Mon Jul 12 06:02:23 PDT 2021


On 12 Jul 2021, at 13:59, Andreas Schwab <schwab at linux-m68k.org> wrote:
> 
> On Jul 12 2021, Jessica Clarke wrote:
> 
>> The original code was stolen for Linux, where __compiler_offsetof is
>> (unconditionally, it seems) defined to __builtin_offsetof. Either
>> __compiler_offsetof should be defined to __builtin_offsetof or it
>> should be deleted, but having both still exist is wrong. Personally I’m
>> of the view OpenSBI should just define offsetof to __builtin_offsetof
> 
> No, it should use <stddef.h>.

OpenSBI is deliberately entirely standalone, unfortunately in this case.

Jess




More information about the opensbi mailing list