summaryrefslogtreecommitdiff
path: root/xmake/core/base/libc.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2022-04-07 21:02:30 +0800
committerruki <[email protected]>2022-04-07 21:02:30 +0800
commitda0d547ca4cbfe5fd61e173d398460874d0e758e (patch)
tree274565ac7d8ec09510808ad7faff571a8c7ef69b /xmake/core/base/libc.lua
parent424b7f895f87551bc2ad5629053733df82994e3a (diff)
add ffi memmove
Diffstat (limited to 'xmake/core/base/libc.lua')
-rw-r--r--xmake/core/base/libc.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/core/base/libc.lua b/xmake/core/base/libc.lua
index 10590dd35..7d166ecfd 100644
--- a/xmake/core/base/libc.lua
+++ b/xmake/core/base/libc.lua
@@ -40,6 +40,7 @@ if ffi then
ffi.cdef[[
void* malloc(size_t size);
void free(void* data);
+ void* memmove(void* dest, const void* src, size_t n);
]]
end
@@ -77,7 +78,7 @@ end
function libc.memmov(dst, src, size)
if ffi then
- return ffi.move(dst, src, size)
+ return ffi.C.memmove(dst, src, size)
else
return libc._memmov(dst, src, size)
end