Commit 98f1bbb8 authored by Federico Vaga's avatar Federico Vaga

sw: improve portability of pointer math

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent f7e143d4
...@@ -123,7 +123,7 @@ static off_t app_meta_id_offset(int fd) ...@@ -123,7 +123,7 @@ static off_t app_meta_id_offset(int fd)
regs = mmap(NULL, 0x100, PROT_READ, MAP_SHARED, fd, 0); regs = mmap(NULL, 0x100, PROT_READ, MAP_SHARED, fd, 0);
if ((long)regs == -1) if ((long)regs == -1)
return -1; return -1;
offset = *((uint32_t *)(regs + SPEC_BASE_REGS_CSR_APP_OFFSET)); offset = *((uint32_t *)((char *)regs + SPEC_BASE_REGS_CSR_APP_OFFSET));
munmap(regs, 0x100); munmap(regs, 0x100);
return offset; return offset;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment