mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-02-25 19:04:21 +03:00
Use nsutils unistd operations for pread and pwrite to get consistant interface
This commit is contained in:
parent
47d08b6506
commit
77ffda1e46
@ -43,6 +43,7 @@
|
||||
#include <errno.h>
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
#include <nsutils/unistd.h>
|
||||
|
||||
#include "utils/filepath.h"
|
||||
#include "utils/file.h"
|
||||
@ -1597,7 +1598,7 @@ static nserror store_write_block(struct store_state *state,
|
||||
|
||||
offst = bi << log2_block_size[elem_idx];
|
||||
|
||||
wr = pwrite(state->blocks[elem_idx][bf].fd,
|
||||
wr = nsu_pwrite(state->blocks[elem_idx][bf].fd,
|
||||
bse->elem[elem_idx].data,
|
||||
bse->elem[elem_idx].size,
|
||||
offst);
|
||||
@ -1753,7 +1754,7 @@ static nserror store_read_block(struct store_state *state,
|
||||
|
||||
offst = bi << log2_block_size[elem_idx];
|
||||
|
||||
rd = pread(state->blocks[elem_idx][bf].fd,
|
||||
rd = nsu_pread(state->blocks[elem_idx][bf].fd,
|
||||
bse->elem[elem_idx].data,
|
||||
bse->elem[elem_idx].size,
|
||||
offst);
|
||||
|
Loading…
x
Reference in New Issue
Block a user