diff options
author | Idwer Vollering <vidwer@gmail.com> | 2017-08-11 11:53:34 +0200 |
---|---|---|
committer | Idwer Vollering <vidwer@gmail.com> | 2017-08-11 18:54:23 +0000 |
commit | 6dc3492355aa9a8828874886f2d2359c58eb24e6 (patch) | |
tree | 97a3b935d519deeb079fea51eeaebf1aaf37bcb0 /util/cbfstool/compiler.h | |
parent | ebe08e0ee3dffad30abffac04f95c7579ec11a30 (diff) |
util/cbmem, util/cbfstool: resolve macro errors on FreeBSD
Using sys/cdefs.h would come to mind,
however this include would not solve the build error.
Built and runtime tested on FreeBSD 12.0-CURRENT, r322031
Change-Id: I6ec9bc7fea72aa69a41439e002f381bd5e5b6bc6
Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Reviewed-on: https://review.coreboot.org/20924
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'util/cbfstool/compiler.h')
-rw-r--r-- | util/cbfstool/compiler.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/util/cbfstool/compiler.h b/util/cbfstool/compiler.h index a830239009..fc6a36b650 100644 --- a/util/cbfstool/compiler.h +++ b/util/cbfstool/compiler.h @@ -16,6 +16,8 @@ #ifndef __COMPILER_H__ #define __COMPILER_H__ +#if !defined(__FreeBSD__) + #if defined(__WIN32) || defined(__WIN64) #define __packed __attribute__((gcc_struct, packed)) #else @@ -23,6 +25,8 @@ #endif #define __aligned(x) __attribute__((aligned(x))) +#endif + #define __always_unused __attribute__((unused)) #define __must_check __attribute__((warn_unused_result)) |