nvramtool:
* Add OSX/Darwin support
* Add $DESTDIR support
* Clean up make install/spec
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Peter Stuge <peter@stuge.se>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4622 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
diff --git a/util/nvramtool/common.h b/util/nvramtool/common.h
index a247380..c8ea92a 100644
--- a/util/nvramtool/common.h
+++ b/util/nvramtool/common.h
@@ -53,7 +53,12 @@
#define INW(x) __extension__ ({ u_int tmp = (x); inw(tmp); })
#define INL(x) __extension__ ({ u_int tmp = (x); inl(tmp); })
#else
+#if defined(__GLIBC__)
#include <sys/io.h>
+#endif
+#if (defined(__MACH__) && defined(__APPLE__))
+#include <DirectIO/darwinio.h>
+#endif
#define OUTB outb
#define OUTW outw
#define OUTL outl