diff options
author | 2022-08-31 20:43:41 -0700 | |
---|---|---|
committer | 2022-09-05 22:49:34 -0700 | |
commit | fdda5f6c0a775c8d6f7a661b7f48f082bc9e61a0 (patch) | |
tree | 1a77441a3b5e7a164ebe3c24399c07bbe9a4c81d /meta-oe/recipes-devtools/perl/libio-pty-perl/0001-Tty.xs-Do-not-mark-strlcpy-as-static.patch | |
parent | 31e19562f6b9a097e18a5c41a0be546ded4a3a20 (diff) | |
download | meta-openembedded-contrib-fdda5f6c0a775c8d6f7a661b7f48f082bc9e61a0.tar.gz |
libio-pty-perl: Fix build on musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools/perl/libio-pty-perl/0001-Tty.xs-Do-not-mark-strlcpy-as-static.patch')
-rw-r--r-- | meta-oe/recipes-devtools/perl/libio-pty-perl/0001-Tty.xs-Do-not-mark-strlcpy-as-static.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/perl/libio-pty-perl/0001-Tty.xs-Do-not-mark-strlcpy-as-static.patch b/meta-oe/recipes-devtools/perl/libio-pty-perl/0001-Tty.xs-Do-not-mark-strlcpy-as-static.patch new file mode 100644 index 0000000000..07c7690fb8 --- /dev/null +++ b/meta-oe/recipes-devtools/perl/libio-pty-perl/0001-Tty.xs-Do-not-mark-strlcpy-as-static.patch @@ -0,0 +1,45 @@ +From fae771aefc593a0ef798bc0c1e21b0524eb85e2d Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 31 Aug 2022 20:32:35 -0700 +Subject: [PATCH] Tty.xs: Do not mark strlcpy as static + +Some libcs e.g. musl do not provide implementation of strlcpy but they +do provide the signature in string.h, if we mark it static here then it +conflicts with the libc define and compiler may warn/error + +Fixes +Tty.xs:190:1: error: static declaration of 'strlcpy' follows non-static declaration +strlcpy( ^ +/mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/libio-pty-perl/1.16-r0/recipe-sysroot/usr/include/string.h:86:8: note: previous declaration is here +size_t strlcpy (char *, const char *, size_t); ^ + +Upstream-Status: Submitted [https://github.com/toddr/IO-Tty/pull/33] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + Tty.xs | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/Tty.xs b/Tty.xs +index aa638f4..4bab39d 100644 +--- a/Tty.xs ++++ b/Tty.xs +@@ -186,11 +186,11 @@ mysignal(int sig, mysig_t act) + * will be copied. Always NUL terminates (unless siz == 0). + * Returns strlen(src); if retval >= siz, truncation occurred. + */ +-static size_t +-strlcpy(dst, src, siz) +- char *dst; +- const char *src; +- size_t siz; ++size_t ++strlcpy( ++ char *dst, ++ const char *src, ++ size_t siz) + { + register char *d = dst; + register const char *s = src; +-- +2.37.3 + |