Skip to content

Commit

Permalink
Fix ILP32 data model detection with GCC on 32bit ARM
Browse files Browse the repository at this point in the history
Unfortunately, GCC does not define `__ILP32__` on 32 bit ARM (contrary
to e.g. x86), so rely on `__arm__` instead.

This does not change API/ABI, but fixes a compilation error for one
specific architecture and compiler combination.

Avoids broken workarounds in every downstream user of
mfxdefs.h,  e.g.:  
intel/libvpl@6182082a12#diff-1e7de1ae2d05  
intel/cartwheel-ffmpeg#215
  • Loading branch information
StefanBruens authored and tletnes committed Mar 23, 2023
1 parent 7e0d3fd commit bb20434
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/elements/oneVPL/include/vpl/mfxdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ extern "C"
#define MFX_PACK_BEGIN_STRUCT_W_PTR() MFX_PACK_BEGIN_X(4)
#define MFX_PACK_BEGIN_STRUCT_W_L_TYPE() MFX_PACK_BEGIN_X(8)
/* 32-bit ILP32 data model Linux* */
#elif defined(__ILP32__)
#elif defined(__ILP32__) || defined(__arm__)
#define MFX_PACK_BEGIN_STRUCT_W_PTR() MFX_PACK_BEGIN_X(4)
#define MFX_PACK_BEGIN_STRUCT_W_L_TYPE() MFX_PACK_BEGIN_X(4)
#else
Expand Down

0 comments on commit bb20434

Please sign in to comment.