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>
This commit is contained in:
parent
ebe08e0ee3
commit
6dc3492355
|
@ -16,6 +16,8 @@
|
||||||
#ifndef __COMPILER_H__
|
#ifndef __COMPILER_H__
|
||||||
#define __COMPILER_H__
|
#define __COMPILER_H__
|
||||||
|
|
||||||
|
#if !defined(__FreeBSD__)
|
||||||
|
|
||||||
#if defined(__WIN32) || defined(__WIN64)
|
#if defined(__WIN32) || defined(__WIN64)
|
||||||
#define __packed __attribute__((gcc_struct, packed))
|
#define __packed __attribute__((gcc_struct, packed))
|
||||||
#else
|
#else
|
||||||
|
@ -23,6 +25,8 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define __aligned(x) __attribute__((aligned(x)))
|
#define __aligned(x) __attribute__((aligned(x)))
|
||||||
|
#endif
|
||||||
|
|
||||||
#define __always_unused __attribute__((unused))
|
#define __always_unused __attribute__((unused))
|
||||||
#define __must_check __attribute__((warn_unused_result))
|
#define __must_check __attribute__((warn_unused_result))
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
#ifndef __COMPILER_H__
|
#ifndef __COMPILER_H__
|
||||||
#define __COMPILER_H__
|
#define __COMPILER_H__
|
||||||
|
|
||||||
|
#if !defined(__FreeBSD__)
|
||||||
|
|
||||||
#if defined(__WIN32) || defined(__WIN64)
|
#if defined(__WIN32) || defined(__WIN64)
|
||||||
#define __packed __attribute__((gcc_struct, packed))
|
#define __packed __attribute__((gcc_struct, packed))
|
||||||
#else
|
#else
|
||||||
|
@ -23,6 +25,8 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define __aligned(x) __attribute__((aligned(x)))
|
#define __aligned(x) __attribute__((aligned(x)))
|
||||||
|
#endif
|
||||||
|
|
||||||
#define __always_unused __attribute__((unused))
|
#define __always_unused __attribute__((unused))
|
||||||
#define __must_check __attribute__((warn_unused_result))
|
#define __must_check __attribute__((warn_unused_result))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue