Fix for read()/write() conflict with unistd.h in test_mem_map.c.

This commit is contained in:
xorstream 2017-01-21 01:39:49 +11:00
parent 429bfca48e
commit 837d3787c0

View file

@ -167,14 +167,14 @@ static void test_query_page_size(void **state)
assert_int_equal(4096, page_size); assert_int_equal(4096, page_size);
} }
void write(uc_engine* uc, uint64_t addr, uint64_t len){ void mem_write(uc_engine* uc, uint64_t addr, uint64_t len){
uint8_t* buff = alloca(len); uint8_t* buff = alloca(len);
memset(buff,0,len); memset(buff,0,len);
uc_mem_write(uc, addr, buff, len); uc_mem_write(uc, addr, buff, len);
} }
void read(uc_engine* uc, uint64_t addr, uint64_t len){ void mem_read(uc_engine* uc, uint64_t addr, uint64_t len){
uint8_t* buff = alloca(len); uint8_t* buff = alloca(len);
uc_mem_read(uc, addr, buff, len); uc_mem_read(uc, addr, buff, len);
} }