summaryrefslogtreecommitdiff
path: root/host
diff options
context:
space:
mode:
authorIdwer Vollering <vidwer@gmail.com>2021-05-10 21:15:45 +0200
committerCommit Bot <commit-bot@chromium.org>2021-05-20 10:31:43 +0000
commitb384db34664466386016b03615fe1387aa2d53c7 (patch)
tree11192e23da45b41982aecb45ea74f274f6d697a0 /host
parent6bdfa02d7dccfbc94871bf50f2282e2081b8559c (diff)
downloadvboot-b384db34664466386016b03615fe1387aa2d53c7.tar.gz
This was done on OpenBSD 6.8. Required packages are: e2fsprogs and gcc. Change-Id: I86ec080e1ddb90053d81f1edd17d3406e7e737c6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2903352 Reviewed-by: Patrick Georgi <pgeorgi@chromium.org> Tested-by: Patrick Georgi <pgeorgi@chromium.org> Commit-Queue: Patrick Georgi <pgeorgi@chromium.org>
Diffstat (limited to 'host')
-rw-r--r--host/arch/x86/lib/crossystem_arch.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/host/arch/x86/lib/crossystem_arch.c b/host/arch/x86/lib/crossystem_arch.c
index 6a8f5a26..e805e2a9 100644
--- a/host/arch/x86/lib/crossystem_arch.c
+++ b/host/arch/x86/lib/crossystem_arch.c
@@ -7,7 +7,7 @@
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
-#if !defined(__FreeBSD__)
+#if !defined(__FreeBSD__) && !defined(__OpenBSD__)
#include <linux/nvram.h>
#include <linux/version.h>
#endif
@@ -100,7 +100,7 @@ typedef struct {
static void VbFixCmosChecksum(FILE* file)
{
-#if !defined(__FreeBSD__)
+#if !defined(__FreeBSD__) && !defined(__OpenBSD__)
int fd = fileno(file);
ioctl(fd, NVRAM_SETCKS);
#endif
@@ -666,7 +666,7 @@ static int BraswellFindGpioChipOffset(unsigned *gpio_num, unsigned *offset,
if (uname(&host) == 0) {
if (sscanf(host.release, "%u.%u.", &maj, &min) == 2) {
-#if !defined(__FreeBSD__)
+#if !defined(__FreeBSD__) && !defined(__OpenBSD__)
if (KERNEL_VERSION(maj, min, 0) >= KERNEL_VERSION(4, 16, 0) &&
*offset > 11)
*offset += 3;