[coreboot-gerrit] Change in coreboot[master]: util/cbmem, util/cbfstool: resolve macro errors on FreeBSD
Idwer Vollering (Code Review)
gerrit at coreboot.org
Wed Aug 9 12:20:33 CEST 2017
Idwer Vollering has uploaded this change for review. ( https://review.coreboot.org/20924
Change subject: util/cbmem, util/cbfstool: resolve macro errors on FreeBSD
......................................................................
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 at gmail.com>
---
M util/cbfstool/compiler.h
M util/cbmem/compiler.h
2 files changed, 6 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/24/20924/1
diff --git a/util/cbfstool/compiler.h b/util/cbfstool/compiler.h
index a830239..80d2476 100644
--- a/util/cbfstool/compiler.h
+++ b/util/cbfstool/compiler.h
@@ -18,11 +18,12 @@
#if defined(__WIN32) || defined(__WIN64)
#define __packed __attribute__((gcc_struct, packed))
-#else
+#endif
+#if !defined(__FreeBSD__)
#define __packed __attribute__((packed))
+#define __aligned(x) __attribute__((aligned(x)))
#endif
-#define __aligned(x) __attribute__((aligned(x)))
#define __always_unused __attribute__((unused))
#define __must_check __attribute__((warn_unused_result))
diff --git a/util/cbmem/compiler.h b/util/cbmem/compiler.h
index a830239..80d2476 100644
--- a/util/cbmem/compiler.h
+++ b/util/cbmem/compiler.h
@@ -18,11 +18,12 @@
#if defined(__WIN32) || defined(__WIN64)
#define __packed __attribute__((gcc_struct, packed))
-#else
+#endif
+#if !defined(__FreeBSD__)
#define __packed __attribute__((packed))
+#define __aligned(x) __attribute__((aligned(x)))
#endif
-#define __aligned(x) __attribute__((aligned(x)))
#define __always_unused __attribute__((unused))
#define __must_check __attribute__((warn_unused_result))
--
To view, visit https://review.coreboot.org/20924
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6ec9bc7fea72aa69a41439e002f381bd5e5b6bc6
Gerrit-Change-Number: 20924
Gerrit-PatchSet: 1
Gerrit-Owner: Idwer Vollering <vidwer at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170809/7b7ee525/attachment.html>
More information about the coreboot-gerrit
mailing list