diff options
author | Khem Raj <raj.khem@gmail.com> | 2022-08-31 20:43:41 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2022-09-05 22:49:34 -0700 |
commit | fdda5f6c0a775c8d6f7a661b7f48f082bc9e61a0 (patch) | |
tree | 1a77441a3b5e7a164ebe3c24399c07bbe9a4c81d /meta-oe/recipes-devtools/perl | |
parent | 31e19562f6b9a097e18a5c41a0be546ded4a3a20 (diff) | |
download | meta-openembedded-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')
-rw-r--r-- | meta-oe/recipes-devtools/perl/libio-pty-perl/0001-Tty.xs-Do-not-mark-strlcpy-as-static.patch | 45 | ||||
-rw-r--r-- | meta-oe/recipes-devtools/perl/libio-pty-perl_1.16.bb | 4 |
2 files changed, 48 insertions, 1 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 000000000..07c7690fb --- /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 @@ | |||
1 | From fae771aefc593a0ef798bc0c1e21b0524eb85e2d Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 31 Aug 2022 20:32:35 -0700 | ||
4 | Subject: [PATCH] Tty.xs: Do not mark strlcpy as static | ||
5 | |||
6 | Some libcs e.g. musl do not provide implementation of strlcpy but they | ||
7 | do provide the signature in string.h, if we mark it static here then it | ||
8 | conflicts with the libc define and compiler may warn/error | ||
9 | |||
10 | Fixes | ||
11 | Tty.xs:190:1: error: static declaration of 'strlcpy' follows non-static declaration | ||
12 | strlcpy( ^ | ||
13 | /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 | ||
14 | size_t strlcpy (char *, const char *, size_t); ^ | ||
15 | |||
16 | Upstream-Status: Submitted [https://github.com/toddr/IO-Tty/pull/33] | ||
17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
18 | --- | ||
19 | Tty.xs | 10 +++++----- | ||
20 | 1 file changed, 5 insertions(+), 5 deletions(-) | ||
21 | |||
22 | diff --git a/Tty.xs b/Tty.xs | ||
23 | index aa638f4..4bab39d 100644 | ||
24 | --- a/Tty.xs | ||
25 | +++ b/Tty.xs | ||
26 | @@ -186,11 +186,11 @@ mysignal(int sig, mysig_t act) | ||
27 | * will be copied. Always NUL terminates (unless siz == 0). | ||
28 | * Returns strlen(src); if retval >= siz, truncation occurred. | ||
29 | */ | ||
30 | -static size_t | ||
31 | -strlcpy(dst, src, siz) | ||
32 | - char *dst; | ||
33 | - const char *src; | ||
34 | - size_t siz; | ||
35 | +size_t | ||
36 | +strlcpy( | ||
37 | + char *dst, | ||
38 | + const char *src, | ||
39 | + size_t siz) | ||
40 | { | ||
41 | register char *d = dst; | ||
42 | register const char *s = src; | ||
43 | -- | ||
44 | 2.37.3 | ||
45 | |||
diff --git a/meta-oe/recipes-devtools/perl/libio-pty-perl_1.16.bb b/meta-oe/recipes-devtools/perl/libio-pty-perl_1.16.bb index e71485185..0f1c71b70 100644 --- a/meta-oe/recipes-devtools/perl/libio-pty-perl_1.16.bb +++ b/meta-oe/recipes-devtools/perl/libio-pty-perl_1.16.bb | |||
@@ -3,7 +3,9 @@ SECTION = "libs" | |||
3 | LICENSE = "Artistic-1.0 | GPL-1.0-or-later" | 3 | LICENSE = "Artistic-1.0 | GPL-1.0-or-later" |
4 | LIC_FILES_CHKSUM = "file://META.yml;beginline=11;endline=12;md5=b2562f94907eeb42e8ce9d45f628e587" | 4 | LIC_FILES_CHKSUM = "file://META.yml;beginline=11;endline=12;md5=b2562f94907eeb42e8ce9d45f628e587" |
5 | 5 | ||
6 | SRC_URI = "http://www.cpan.org/modules/by-module/IO/IO-Tty-${PV}.tar.gz" | 6 | SRC_URI = "http://www.cpan.org/modules/by-module/IO/IO-Tty-${PV}.tar.gz \ |
7 | file://0001-Tty.xs-Do-not-mark-strlcpy-as-static.patch \ | ||
8 | " | ||
7 | 9 | ||
8 | SRC_URI[md5sum] = "5ee30bf7c76f00cc69f92388ad776e2a" | 10 | SRC_URI[md5sum] = "5ee30bf7c76f00cc69f92388ad776e2a" |
9 | SRC_URI[sha256sum] = "8f1a09c070738adc695df903f2e7f74308dd8d991b914c0bc390a0e6021294dd" | 11 | SRC_URI[sha256sum] = "8f1a09c070738adc695df903f2e7f74308dd8d991b914c0bc390a0e6021294dd" |