Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

c_gpio: build fix for musl libc #41

Merged
merged 1 commit into from
May 14, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/c_gpio/c_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ setup(void)
if ((uint32_t)gpio_mem % PAGE_SIZE)
gpio_mem += PAGE_SIZE - ((uint32_t)gpio_mem % PAGE_SIZE);

gpio_map = (uint32_t *)mmap( (caddr_t)gpio_mem, BLOCK_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_FIXED, mem_fd, GPIO_BASE);
gpio_map = (uint32_t *)mmap( (void *)gpio_mem, BLOCK_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_FIXED, mem_fd, GPIO_BASE);

if ((uint32_t)gpio_map < 0)
return SETUP_MMAP_FAIL;
Expand Down Expand Up @@ -163,5 +163,5 @@ void
cleanup(void)
{
// fixme - set all gpios back to input
munmap((caddr_t)gpio_map, BLOCK_SIZE);
munmap((void *)gpio_map, BLOCK_SIZE);
}