summaryrefslogtreecommitdiffstats
path: root/hwaccess.h
diff options
context:
space:
mode:
authorStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2015-05-23 23:59:23 +0000
committerStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2015-05-23 23:59:23 +0000
commitc71759d3d3668235e0f44e56e224e226ee09ee23 (patch)
tree689dae40f6ef1f2460948a320307d581b22366e8 /hwaccess.h
parent95edc89a943ffdc935cdb279ae0fba63b8cae2a9 (diff)
downloadast2050-flashrom-c71759d3d3668235e0f44e56e224e226ee09ee23.zip
ast2050-flashrom-c71759d3d3668235e0f44e56e224e226ee09ee23.tar.gz
hwaccess.h: fix compilation on OSX
DirectHW provides prototypes for out[bwl] and in[bwl], but we still need to define the respective OUT[BWL] and IN[BWL] binding macros. Apparently this has been broken since r1864 (or January 2015). Corresponding to flashrom svn r1890. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Diffstat (limited to 'hwaccess.h')
-rw-r--r--hwaccess.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/hwaccess.h b/hwaccess.h
index 5378361..3e46192 100644
--- a/hwaccess.h
+++ b/hwaccess.h
@@ -231,11 +231,6 @@ cpu_to_be(64)
#define INL(x) __extension__ ({ u_int inl_tmp = (x); inl(inl_tmp); })
#else
-#if defined(__MACH__) && defined(__APPLE__)
- /* Header is part of the DirectHW library. */
- #include <DirectHW/DirectHW.h>
-#else
-
#if defined (__sun)
/* Note different order for outb */
#define OUTB(x,y) outb(y, x)
@@ -259,6 +254,12 @@ cpu_to_be(64)
#define INL inportl
#else
+
+#if defined(__MACH__) && defined(__APPLE__)
+ /* Header is part of the DirectHW library. */
+ #include <DirectHW/DirectHW.h>
+#endif
+
/* This is the usual glibc interface. */
#define OUTB outb
#define OUTW outw
@@ -269,7 +270,6 @@ cpu_to_be(64)
#endif
#endif
#endif
-#endif
#if defined(__NetBSD__) || defined (__OpenBSD__)
#if defined(__i386__) || defined(__x86_64__)
OpenPOWER on IntegriCloud