From 65c362efceceaf5955ffd9c4a8f697631954278d Mon Sep 17 00:00:00 2001 From: John Reiser Date: Mon, 26 Aug 2024 16:43:58 -0700 Subject: [PATCH] MSVC lacks stpcpy() modified: p_lx_elf.cpp --- src/p_lx_elf.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/p_lx_elf.cpp b/src/p_lx_elf.cpp index 5833db36..3ab4640f 100644 --- a/src/p_lx_elf.cpp +++ b/src/p_lx_elf.cpp @@ -5919,7 +5919,9 @@ unsigned PackLinuxElf32::forward_Shdrs(OutputFile *fo, Elf32_Ehdr *const eho) } } set_te32(&sh_out->sh_name, ptr_shstrings - (char *)mb_shstrings.getVoidPtr()); - ptr_shstrings = 1+ stpcpy(ptr_shstrings, name); // past terminating '\0' + do { // stupid MSVC lacks stpcpy() + *ptr_shstrings++ = *name; + } while (*name++); ++sh_out; ++n_sh_out; // actually commit the fowarding } }