From 5b076fe234bbb222da091a9175212d2b92ba2f50 Mon Sep 17 00:00:00 2001 From: Nick Overdijk Date: Sat, 14 Dec 2013 01:40:00 +0100 Subject: [PATCH] Fixes warnings in clang for unrecognized attribute 'gcc_struct' --- include/assimp/Compiler/pushpack1.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/assimp/Compiler/pushpack1.h b/include/assimp/Compiler/pushpack1.h index 71e6089bd..8bdb71293 100644 --- a/include/assimp/Compiler/pushpack1.h +++ b/include/assimp/Compiler/pushpack1.h @@ -8,6 +8,7 @@ // MSVC 7,8,9 // GCC // BORLAND (complains about 'pack state changed but not reverted', but works) +// Clang // // // USAGE: @@ -25,7 +26,11 @@ # pragma pack(push,1) # define PACK_STRUCT #elif defined( __GNUC__ ) -# define PACK_STRUCT __attribute__((gcc_struct, __packed__)) +# if defined(__clang__) +# define PACK_STRUCT __attribute__((__packed__)) +# else +# define PACK_STRUCT __attribute__((gcc_struct, __packed__)) +# endif #else # error Compiler not supported #endif