summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillian Z <Willian@Willian-Zhang.com>2022-04-24 20:36:48 +0800
committerWillian Z <Willian@Willian-Zhang.com>2022-04-24 21:24:06 +0800
commit85f05e79dc4416735d86500948b3e682cffe5d6c (patch)
tree51b1634e3399c7ac0a34e4ba7d7fa9563a6af6ac
parent91132a4ffa92377706218c73200332ee870e17af (diff)
fix mempcpy not available on mac
-rw-r--r--mbw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mbw.c b/mbw.c
index acfbcff..884fd60 100644
--- a/mbw.c
+++ b/mbw.c
@@ -120,10 +120,10 @@ double worker(unsigned long long asize, long *a, long *b, int type, unsigned lon
char* bb = (char*)b;
gettimeofday(&starttime, NULL);
for (t=array_bytes; t >= block_size; t-=block_size, aa+=block_size){
- bb=mempcpy(bb, aa, block_size);
+ bb=(char *) memcpy(bb, aa, block_size) + block_size;
}
if(t) {
- bb=mempcpy(bb, aa, t);
+ bb=(char *) memcpy(bb, aa, t) + t;
}
gettimeofday(&endtime, NULL);
} else if(type==TEST_DUMB) { /* dumb test */