btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / by-name / xa / xar / patches / 0018-Replace-memcpy-with-memmove-for-musl.patch
blob2b8c17100951eede1fdd48e98eef498b6d7273ef
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Ivan Trubach <mr.trubach@icloud.com>
3 Date: Tue, 30 Jul 2024 17:29:06 +0300
4 Subject: [PATCH 18/19] Replace memcpy with memmove for musl
6 ---
7 xar/lib/io.c | 2 +-
8 1 file changed, 1 insertion(+), 1 deletion(-)
10 diff --git a/xar/lib/io.c b/xar/lib/io.c
11 index 64c69af..c962c4b 100644
12 --- a/xar/lib/io.c
13 +++ b/xar/lib/io.c
14 @@ -650,7 +650,7 @@ static int32_t flush_stream(xar_stream *stream) {
15 state->pending_buf = NULL;
16 } else if( state->pending_buf_size > len ) {
17 state->pending_buf_size -= len;
18 - memcpy(state->pending_buf, state->pending_buf + len, state->pending_buf_size);
19 + memmove(state->pending_buf, state->pending_buf + len, state->pending_buf_size);
23 --
24 2.44.1