summaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorChangqing Li <changqing.li@windriver.com>2024-06-14 15:53:34 +0800
committerKhem Raj <raj.khem@gmail.com>2024-06-14 10:20:37 -0700
commitf6f2fad649b2d404f40660968151b8b5a58c5fc7 (patch)
tree605814cd4ab4c9a193f7e76e41a626940259e872 /meta-networking
parent27635c0adcf13dd5fd40b75b3e809376888185a3 (diff)
downloadmeta-openembedded-f6f2fad649b2d404f40660968151b8b5a58c5fc7.tar.gz
tnftp: fix lib32-tnftp build failure with gcc-14
lib32-tnftp do_compile failed with gcc-14: ../../tnftp-20230507/libedit/terminal.c:597:56: error: passing argument 2 of 'terminal_overwrite' from incompatible pointer type [-Wincompatible-pointer-types] 597 | terminal_overwrite(el, &el->el_display[ | ^~~~~~~~~~~~~~~~ | | | wint_t * {aka unsigned int *} 598 | el->el_cursor.v][el->el_cursor.h], | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../tnftp-20230507/libedit/refresh.c:114:38: error: initialization of 'wchar_t *' {aka 'long int *'} from incompatible pointer type 'wint_t *' {aka 'unsigned int *'} [-Wincompatible-pointer-types] 114 | wchar_t *firstline = el->el_vdisplay[0]; For 64bit system: wchar_t is defined as int wint_t is define as unsigned int For 32bit system: wchar_t is defined as long int wint_t is define as unsigned int In 64bit case, it works well, but in 32bit case, gcc will take it as incompatible, and report above error Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking')
-rw-r--r--meta-networking/recipes-support/tnftp/tnftp/0001-Add-casts-to-appease-conversions-between-wchar_t-and.patch77
-rw-r--r--meta-networking/recipes-support/tnftp/tnftp/0002-Add-casts-to-appease-conversions-between-wchar_t-and.patch29
-rw-r--r--meta-networking/recipes-support/tnftp/tnftp_20230507.bb2
3 files changed, 108 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/tnftp/tnftp/0001-Add-casts-to-appease-conversions-between-wchar_t-and.patch b/meta-networking/recipes-support/tnftp/tnftp/0001-Add-casts-to-appease-conversions-between-wchar_t-and.patch
new file mode 100644
index 0000000000..bbd6c78434
--- /dev/null
+++ b/meta-networking/recipes-support/tnftp/tnftp/0001-Add-casts-to-appease-conversions-between-wchar_t-and.patch
@@ -0,0 +1,77 @@
1From 46477eb182af51b5da8299b295a6d61e566e3693 Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Fri, 14 Jun 2024 06:27:19 +0000
4Subject: [PATCH] Add casts to appease conversions between wchar_t and wint_t
5
6Upstream-Status: Backport [http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libedit/refresh.c.diff?r1=1.57&r2=1.58&only_with_tag=MAIN&f=h]
7
8Signed-off-by: Changqing Li <changqing.li@windriver.com>
9---
10 libedit/refresh.c | 16 +++++++++-------
11 1 file changed, 9 insertions(+), 7 deletions(-)
12
13diff --git a/libedit/refresh.c b/libedit/refresh.c
14index 093f993..a6d4574 100644
15--- a/libedit/refresh.c
16+++ b/libedit/refresh.c
17@@ -111,7 +111,7 @@ re_nextline(EditLine *el)
18 */
19 if (el->el_refresh.r_cursor.v + 1 >= el->el_terminal.t_size.v) {
20 int i, lins = el->el_terminal.t_size.v;
21- wchar_t *firstline = el->el_vdisplay[0];
22+ wint_t *firstline = el->el_vdisplay[0];
23
24 for(i = 1; i < lins; i++)
25 el->el_vdisplay[i - 1] = el->el_vdisplay[i];
26@@ -340,7 +340,8 @@ re_refresh(EditLine *el)
27 ELRE_DEBUG(1, (__F, "updating %d lines.\r\n", el->el_refresh.r_newcv));
28 for (i = 0; i <= el->el_refresh.r_newcv; i++) {
29 /* NOTE THAT re_update_line MAY CHANGE el_display[i] */
30- re_update_line(el, el->el_display[i], el->el_vdisplay[i], i);
31+ re_update_line(el, (wchar_t *)el->el_display[i],
32+ (wchar_t *)el->el_vdisplay[i], i);
33
34 /*
35 * Copy the new line to be the current one, and pad out with
36@@ -349,8 +350,9 @@ re_refresh(EditLine *el)
37 * end of the screen line, it won't be a NUL or some old
38 * leftover stuff.
39 */
40- re__copy_and_pad(el->el_display[i], el->el_vdisplay[i],
41- (size_t) el->el_terminal.t_size.h);
42+ re__copy_and_pad((wchar_t *)el->el_display[i],
43+ (wchar_t *)el->el_vdisplay[i],
44+ (size_t) el->el_terminal.t_size.h);
45 }
46 ELRE_DEBUG(1, (__F,
47 "\r\nel->el_refresh.r_cursor.v=%d,el->el_refresh.r_oldcv=%d i=%d\r\n",
48@@ -361,7 +363,7 @@ re_refresh(EditLine *el)
49 terminal_move_to_line(el, i);
50 terminal_move_to_char(el, 0);
51 /* This wcslen should be safe even with MB_FILL_CHARs */
52- terminal_clear_EOL(el, (int) wcslen(el->el_display[i]));
53+ terminal_clear_EOL(el, (int) wcslen((const wchar_t *)el->el_display[i]));
54 #ifdef DEBUG_REFRESH
55 terminal_overwrite(el, L"C\b", 2);
56 #endif /* DEBUG_REFRESH */
57@@ -1097,7 +1099,7 @@ re_refresh_cursor(EditLine *el)
58 static void
59 re_fastputc(EditLine *el, wint_t c)
60 {
61- wchar_t *lastline;
62+ wint_t *lastline;
63 int w;
64
65 w = wcwidth(c);
66@@ -1132,7 +1134,7 @@ re_fastputc(EditLine *el, wint_t c)
67 el->el_cursor.v++;
68 lastline = el->el_display[++el->el_refresh.r_oldcv];
69 }
70- re__copy_and_pad(lastline, L"", (size_t)el->el_terminal.t_size.h);
71+ re__copy_and_pad((wchar_t *)lastline, L"", (size_t)el->el_terminal.t_size.h);
72
73 if (EL_HAS_AUTO_MARGINS) {
74 if (EL_HAS_MAGIC_MARGINS) {
75--
762.35.5
77
diff --git a/meta-networking/recipes-support/tnftp/tnftp/0002-Add-casts-to-appease-conversions-between-wchar_t-and.patch b/meta-networking/recipes-support/tnftp/tnftp/0002-Add-casts-to-appease-conversions-between-wchar_t-and.patch
new file mode 100644
index 0000000000..c041d0a9da
--- /dev/null
+++ b/meta-networking/recipes-support/tnftp/tnftp/0002-Add-casts-to-appease-conversions-between-wchar_t-and.patch
@@ -0,0 +1,29 @@
1From 5c8334f86d139de987c716a0d5acc0f40d8d3b7d Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Fri, 14 Jun 2024 06:38:37 +0000
4Subject: [PATCH] Add casts to appease conversions between wchar_t and wint_t
5
6Upstream-Status: Backport [http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libedit/terminal.c.diff?r1=1.43&r2=1.44&only_with_tag=MAIN&f=h]
7
8Signed-off-by: Changqing Li <changqing.li@windriver.com>
9---
10 libedit/terminal.c | 3 ++-
11 1 file changed, 2 insertions(+), 1 deletion(-)
12
13diff --git a/libedit/terminal.c b/libedit/terminal.c
14index 19cee48..13f7bcd 100644
15--- a/libedit/terminal.c
16+++ b/libedit/terminal.c
17@@ -594,7 +594,8 @@ mc_again:
18 * NOTE THAT terminal_overwrite() WILL CHANGE
19 * el->el_cursor.h!!!
20 */
21- terminal_overwrite(el, &el->el_display[
22+ terminal_overwrite(el,
23+ (wchar_t *)&el->el_display[
24 el->el_cursor.v][el->el_cursor.h],
25 (size_t)(where - el->el_cursor.h));
26
27--
282.35.5
29
diff --git a/meta-networking/recipes-support/tnftp/tnftp_20230507.bb b/meta-networking/recipes-support/tnftp/tnftp_20230507.bb
index bdd9759f26..4ab694fbba 100644
--- a/meta-networking/recipes-support/tnftp/tnftp_20230507.bb
+++ b/meta-networking/recipes-support/tnftp/tnftp_20230507.bb
@@ -16,6 +16,8 @@ DEPENDS = "ncurses"
16 16
17SRC_URI = "https://ftp.netbsd.org/pub/NetBSD/misc/tnftp/${BPN}-${PV}.tar.gz \ 17SRC_URI = "https://ftp.netbsd.org/pub/NetBSD/misc/tnftp/${BPN}-${PV}.tar.gz \
18 file://0001-libedit-Include-missing-header-stdc-predef.h.patch \ 18 file://0001-libedit-Include-missing-header-stdc-predef.h.patch \
19 file://0001-Add-casts-to-appease-conversions-between-wchar_t-and.patch \
20 file://0002-Add-casts-to-appease-conversions-between-wchar_t-and.patch \
19" 21"
20 22
21inherit autotools update-alternatives pkgconfig 23inherit autotools update-alternatives pkgconfig