diff options
author | Stefan Reinauer <stepan@coresystems.de> | 2009-09-01 09:52:14 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2009-09-01 09:52:14 +0000 |
commit | f7f2f258d8b44218c2efb83cfb276890fd4fb95c (patch) | |
tree | d6eb6993ca8574571bfed1ca0b05835ea5850e1a /util/inteltool/inteltool.c | |
parent | b2aedb1a3f2409b549c4094654281893b82c7435 (diff) |
Clean up Mac OS X support of inteltool
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Peter Stuge <peter@stuge.se>
Some minor modifications to allow 64bit/32bit compilation on Darwin
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4621 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/inteltool/inteltool.c')
-rw-r--r-- | util/inteltool/inteltool.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/util/inteltool/inteltool.c b/util/inteltool/inteltool.c index 04b0a9d87f..827ce29b48 100644 --- a/util/inteltool/inteltool.c +++ b/util/inteltool/inteltool.c @@ -50,10 +50,10 @@ static const struct { { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH, "ICH" } }; -#ifndef DARWIN +#ifndef __DARWIN__ static int fd_mem; -void *map_physical(unsigned long phys_addr, int len) +void *map_physical(unsigned long phys_addr, size_t len) { void *virt_addr; @@ -68,7 +68,7 @@ void *map_physical(unsigned long phys_addr, int len) return virt_addr; } -void unmap_physical(void *virt_addr, int len) +void unmap_physical(void *virt_addr, size_t len) { munmap(virt_addr, len); } @@ -192,7 +192,7 @@ int main(int argc, char *argv[]) exit(1); } -#ifndef DARWIN +#ifndef __DARWIN__ if ((fd_mem = open("/dev/mem", O_RDWR)) < 0) { perror("Can not open /dev/mem"); exit(1); |