This patch adds libc __wcscpy_chk needed by Python 3. Please see http://refspecs.linux-foundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/libc---wcscpy-chk-1.html for details.
Signed-off-by: Waldemar Kozaczuk <jwkozac...@gmail.com> --- Makefile | 1 + libc/string/__wcscpy_chk.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 libc/string/__wcscpy_chk.c diff --git a/Makefile b/Makefile index add72f9d..5a24ca67 100644 --- a/Makefile +++ b/Makefile @@ -1625,6 +1625,7 @@ libc += string/wcscat.o musl += string/wcschr.o musl += string/wcscmp.o libc += string/wcscpy.o +libc += string/__wcscpy_chk.o musl += string/wcscspn.o musl += string/wcsdup.o musl += string/wcslen.o diff --git a/libc/string/__wcscpy_chk.c b/libc/string/__wcscpy_chk.c new file mode 100644 index 00000000..64d0144f --- /dev/null +++ b/libc/string/__wcscpy_chk.c @@ -0,0 +1,15 @@ +/* + * Copyright (C) 2018 Waldemar Kozaczuk + * + * This work is open source software, licensed under the terms of the + * BSD license as described in the LICENSE file in the top-level directory. + */ + +#include <wchar.h> +#include <assert.h> + +wchar_t *__wcscpy_chk(wchar_t *__restrict dest, const wchar_t *__restrict src, size_t destlen) +{ + assert(wcslen(src) + sizeof(L'\0') <= destlen); + return wcscpy(dest, src); +} -- 2.17.1 -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to osv-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.