diff options
author | Idwer Vollering <vidwer@gmail.com> | 2021-05-10 21:15:45 +0200 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-05-20 10:31:43 +0000 |
commit | b384db34664466386016b03615fe1387aa2d53c7 (patch) | |
tree | 11192e23da45b41982aecb45ea74f274f6d697a0 /futility/cmd_vbutil_kernel.c | |
parent | 6bdfa02d7dccfbc94871bf50f2282e2081b8559c (diff) | |
download | vboot-stabilize-13982.70.B.tar.gz |
portability fixes: support building vboot on OpenBSDstabilize-13983.Bstabilize-13982.88.Bstabilize-13982.82.Bstabilize-13982.70.Bstabilize-13982.69.Bstabilize-13982.60.Bstabilize-13982.51.Brelease-R92-13982.B
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 'futility/cmd_vbutil_kernel.c')
-rw-r--r-- | futility/cmd_vbutil_kernel.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/futility/cmd_vbutil_kernel.c b/futility/cmd_vbutil_kernel.c index 83a76f84..27cbb9bc 100644 --- a/futility/cmd_vbutil_kernel.c +++ b/futility/cmd_vbutil_kernel.c @@ -9,7 +9,7 @@ #include <fcntl.h> #include <getopt.h> #include <inttypes.h> /* For PRIu64 */ -#if !defined(HAVE_MACOS) && !defined(__FreeBSD__) +#if !defined(HAVE_MACOS) && !defined(__FreeBSD__) && !defined(__OpenBSD__) #include <linux/fs.h> /* For BLKGETSIZE64 */ #endif #include <stdarg.h> @@ -173,7 +173,7 @@ static uint8_t *ReadOldKPartFromFileOrDie(const char *filename, FATAL("Unable to stat %s: %s\n", filename, strerror(errno)); if (S_ISBLK(statbuf.st_mode)) { -#if !defined(HAVE_MACOS) && !defined(__FreeBSD__) +#if !defined(HAVE_MACOS) && !defined(__FreeBSD__) && !defined(__OpenBSD__) int fd = open(filename, O_RDONLY); if (fd >= 0) { ioctl(fd, BLKGETSIZE64, &file_size); |