summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2009-04-28 12:56:04 +0000
committerhailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2009-04-28 12:56:04 +0000
commit74f5fad2ebe6e72184c6b9d84ce9aa57910b750e (patch)
tree29a588be5329b2e9f955a2bc11628683cca0b605
parent18f507d5a7d2ceaed935df14c15b076cd6ece874 (diff)
downloadflashrom-74f5fad2ebe6e72184c6b9d84ce9aa57910b750e.tar.gz
There are still some tweaks necessary to get Flashrom to build on
DragonFly, but this helps a lot. Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@445 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
-rw-r--r--flash.h2
-rw-r--r--flashrom.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/flash.h b/flash.h
index 59c6c47..e3cd49e 100644
--- a/flash.h
+++ b/flash.h
@@ -34,7 +34,7 @@
#define __DARWIN__
#endif
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__DragonFly__)
#include <machine/cpufunc.h>
#define off64_t off_t
#define lseek64 lseek
diff --git a/flashrom.c b/flashrom.c
index 8e1c3e4..0e3049c 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -344,7 +344,7 @@ int main(int argc, char *argv[])
int force = 0;
int read_it = 0, write_it = 0, erase_it = 0, verify_it = 0;
int ret = 0, i;
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__DragonFly__)
int io_fd;
#endif
@@ -462,7 +462,7 @@ int main(int argc, char *argv[])
/* First get full io access */
#if defined (__sun) && (defined(__i386) || defined(__amd64))
if (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) != 0) {
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined (__DragonFly__)
if ((io_fd = open("/dev/io", O_RDWR)) < 0) {
#else
if (iopl(3) != 0) {