multi
Avril 4 years ago
parent 040218dc04
commit ddb80535ca
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -30,7 +30,7 @@ int open_and_map(const char* file, mmap_t* restrict ptr)
register struct mmap map = { .fd = fd, .ptr = NULL, .len = st.st_size }; register struct mmap map = { .fd = fd, .ptr = NULL, .len = st.st_size };
if ((map.ptr = mmap(NULL, map.len, PROT_READ, MAP_SHARED,fd, 0)) == MAP_FAILED) { if ((map.ptr = mmap(NULL, map.len, PROT_READ, MAP_SHARED,fd, 0)) == MAP_FAILED) {
perror("mmam() failed"); perror("mmap() failed");
close(fd); close(fd);
return 0; return 0;
} }

Loading…
Cancel
Save