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
This commit is contained in:
committed by
Stefan Reinauer
parent
b2aedb1a3f
commit
f7f2f258d8
@ -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);
|
||||
|
Reference in New Issue
Block a user