소스 검색

Support for GCC 5.X Compilers

This will hopefully correct Issue #252 which appears to only affect
users with ArchLinux.
Peter Robinson 10 년 전
부모
커밋
23568a6916
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      engine/source/platform/types.h

+ 5 - 0
engine/source/platform/types.h

@@ -170,6 +170,11 @@ inline U32 endianSwap(const U32 in_swap)
 #define Offset(x, cls) _Offset_Normal(x, cls)
 #define OffsetNonConst(x, cls) _Offset_Variant_1(x, cls)
 
+#elif defined(TORQUE_COMPILER_GCC) && (__GNUC__ == 5)
+#include <stddef.h>
+#define Offset(x, cls) offsetof(cls, x)
+#define OffsetNonConst(x, cls) _Offset_Normal(x, cls)
+
 #endif
 #endif