[coreboot-gerrit] Change in coreboot[master]: nvramtool: Fix build with OpenBSD

Philipp Deppenwiese (Code Review) gerrit at coreboot.org
Tue Apr 17 00:18:30 CEST 2018


Philipp Deppenwiese has submitted this change and it was merged. ( https://review.coreboot.org/19741 )

Change subject: nvramtool: Fix build with OpenBSD
......................................................................

nvramtool: Fix build with OpenBSD

OpenBSD needs the same includes as NetBSD. It also doesn't have x86_64_iopl
function, but amd64_iopl.

Change-Id: I28273d4d87a3a77cf35412a0695325c0535e42e5
Signed-off-by: Piotr Kubaj <pkubaj at anongoth.pl>
Reviewed-on: https://review.coreboot.org/19741
Tested-by: build bot (Jenkins) <no-reply at coreboot.org>
Reviewed-by: Arthur Heymans <arthur at aheymans.xyz>
Reviewed-by: Philippe Mathieu-Daudé <f4bug at amsat.org>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki at gmail.com>
---
M util/nvramtool/Makefile
M util/nvramtool/accessors/cmos-hw-unix.c
2 files changed, 6 insertions(+), 2 deletions(-)

Approvals:
  build bot (Jenkins): Verified
  Philipp Deppenwiese: Looks good to me, approved
  Arthur Heymans: Looks good to me, but someone else must approve
  Philippe Mathieu-Daudé: Looks good to me, but someone else must approve



diff --git a/util/nvramtool/Makefile b/util/nvramtool/Makefile
index bb623bb..8da7c76 100644
--- a/util/nvramtool/Makefile
+++ b/util/nvramtool/Makefile
@@ -34,7 +34,7 @@
 ifeq ($(OS_ARCH), Darwin)
 LDFLAGS = -framework DirectHW
 endif
-ifeq ($(OS_ARCH), NetBSD)
+ifeq ($(OS_ARCH),$(filter $(OS_ARCH),NetBSD OpenBSD))
 LDFLAGS = -l$(shell uname -p)
 endif
 ifeq ($(shell uname -o 2>/dev/null), Cygwin)
diff --git a/util/nvramtool/accessors/cmos-hw-unix.c b/util/nvramtool/accessors/cmos-hw-unix.c
index 33d6994..c66fa3e 100644
--- a/util/nvramtool/accessors/cmos-hw-unix.c
+++ b/util/nvramtool/accessors/cmos-hw-unix.c
@@ -17,7 +17,7 @@
 #if (defined(__MACH__) && defined(__APPLE__))
 #include <DirectHW/DirectHW.h>
 #endif
-#if defined(__NetBSD__)
+#if defined(__NetBSD__) || defined(__OpenBSD__)
 #if defined(__i386__) || defined(__x86_64__)
 #include <machine/sysarch.h>
 
@@ -58,8 +58,12 @@
 }
 #endif
 #ifdef __x86_64__
+#ifdef __OpenBSD__
+#define iopl amd64_iopl
+#else
 #define iopl x86_64_iopl
 #endif
+#endif
 #ifdef __i386__
 #define iopl i386_iopl
 #endif

-- 
To view, visit https://review.coreboot.org/19741
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I28273d4d87a3a77cf35412a0695325c0535e42e5
Gerrit-Change-Number: 19741
Gerrit-PatchSet: 5
Gerrit-Owner: Piotr Kubaj <pkubaj at anongoth.pl>
Gerrit-Reviewer: Arthur Heymans <arthur at aheymans.xyz>
Gerrit-Reviewer: Paul Menzel <paulepanter at users.sourceforge.net>
Gerrit-Reviewer: Philipp Deppenwiese <zaolin.daisuki at gmail.com>
Gerrit-Reviewer: Philippe Mathieu-Daudé <f4bug at amsat.org>
Gerrit-Reviewer: Piotr Kubaj <pkubaj at anongoth.pl>
Gerrit-Reviewer: build bot (Jenkins) <no-reply at coreboot.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180416/090d8fba/attachment.html>


More information about the coreboot-gerrit mailing list