Commit 60622e22 authored by Patrick Georgi's avatar Patrick Georgi Committed by Carl-Daniel Hailfinger
Browse files

Handle DragonFly BSD definitions in flash.h


There are still some tweaks necessary to get flashrom to build on
DragonFly, but this helps a lot.

Corresponding to flashrom svn r445.
Signed-off-by: default avatarPatrick Georgi <patrick.georgi@coresystems.de>
Acked-by: default avatarStefan Reinauer <stepan@coresystems.de>
Acked-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
parent dd315e10
......@@ -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
......
......@@ -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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment