diff options
author | Patrick Georgi <patrick.georgi@coresystems.de> | 2010-09-30 17:03:32 +0000 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2010-09-30 17:03:32 +0000 |
commit | a9095a95450860e7ea96bb6c21ca4f34e406d3d6 (patch) | |
tree | f79ff036266bb09b180f27b3552dd30116a221e4 /hwaccess.c | |
parent | 5cfc94a98be9fa2317220c76367fe1792c328461 (diff) | |
download | flashrom-a9095a95450860e7ea96bb6c21ca4f34e406d3d6.tar.gz flashrom-a9095a95450860e7ea96bb6c21ca4f34e406d3d6.tar.bz2 flashrom-a9095a95450860e7ea96bb6c21ca4f34e406d3d6.zip |
Add support for building flashrom against libpayload
This doesn't include changes to the frontend which must be
done separately, so this won't work out of the box.
This code was tested on hardware.
Corresponding to flashrom svn r1184.
Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'hwaccess.c')
-rw-r--r-- | hwaccess.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hwaccess.c b/hwaccess.c index 3a61e6098..bbb91a662 100644 --- a/hwaccess.c +++ b/hwaccess.c @@ -22,9 +22,11 @@ #include <string.h> #include <stdlib.h> #include <sys/types.h> -#if !defined (__DJGPP__) +#if !defined (__DJGPP__) && !defined(__LIBPAYLOAD__) #include <unistd.h> #include <fcntl.h> +#endif +#if !defined (__DJGPP__) #include <errno.h> #endif #include "flash.h" @@ -44,7 +46,7 @@ int io_fd; void get_io_perms(void) { -#if defined(__DJGPP__) +#if defined(__DJGPP__) || defined(__LIBPAYLOAD__) /* We have full permissions by default. */ return; #else |