diff --git a/0001-build-fix-build-failures-with-MinGW-new-headers.patch b/0001-build-fix-build-failures-with-MinGW-new-headers.patch new file mode 100644 index 0000000000000000000000000000000000000000..c963a97705f5b42185b5e00e66c7b9891d72da4b --- /dev/null +++ b/0001-build-fix-build-failures-with-MinGW-new-headers.patch @@ -0,0 +1,37 @@ +From 3e90bc76b036124c2a94f9bf006af527755271cf Mon Sep 17 00:00:00 2001 +From: erw7 +Date: Wed, 3 Nov 2021 00:28:42 +0900 +Subject: [PATCH] build: fix build failures with MinGW new headers + +A structure definition was added to mstcpip.h in +mingw-w64-x86_64-headers-git 9.0.0.6327.f29c1101f, +which causes a conflict and the build fails. Fix this by +changing the name in the definition in mstcpip.h. + +PR-URL: https://github.com/libuv/libuv/pull/3345 +--- + include/uv/win.h | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/include/uv/win.h b/include/uv/win.h +index f5f1d3a3..5fecf4bf 100644 +--- a/include/uv/win.h ++++ b/include/uv/win.h +@@ -45,7 +45,14 @@ typedef struct pollfd { + #endif + + #include ++// Disable the typedef in mstcpip.h of MinGW. ++#define _TCP_INITIAL_RTO_PARAMETERS _TCP_INITIAL_RTO_PARAMETERS__AVOID ++#define TCP_INITIAL_RTO_PARAMETERS TCP_INITIAL_RTO_PARAMETERS__AVOID ++#define PTCP_INITIAL_RTO_PARAMETERS PTCP_INITIAL_RTO_PARAMETERS__AVOID + #include ++#undef _TCP_INITIAL_RTO_PARAMETERS ++#undef TCP_INITIAL_RTO_PARAMETERS ++#undef PTCP_INITIAL_RTO_PARAMETERS + #include + + #include +-- +2.33.0 + diff --git a/0001-test-fix-typo-in-test-tty-escape-sequence-processing.patch b/0001-test-fix-typo-in-test-tty-escape-sequence-processing.patch new file mode 100644 index 0000000000000000000000000000000000000000..dd078a22395613ad9e22d6be55bd4fd8eedc7a55 --- /dev/null +++ b/0001-test-fix-typo-in-test-tty-escape-sequence-processing.patch @@ -0,0 +1,48 @@ +From 50c337a0b177669410efef83541e6f17c63ff5b0 Mon Sep 17 00:00:00 2001 +From: Ikko Ashimine +Date: Wed, 8 Sep 2021 23:02:11 +0900 +Subject: [PATCH] test: fix typo in test-tty-escape-sequence-processing.c + +postion -> position in several comments + +PR-URL: https://github.com/libuv/libuv/pull/3284 +Reviewed-By: Ben Noordhuis +Reviewed-By: Jameson Nash +--- + test/test-tty-escape-sequence-processing.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/test/test-tty-escape-sequence-processing.c b/test/test-tty-escape-sequence-processing.c +index ef34e592..c19ccb5c 100644 +--- a/test/test-tty-escape-sequence-processing.c ++++ b/test/test-tty-escape-sequence-processing.c +@@ -271,7 +271,7 @@ static void make_expect_screen_erase(struct captured_screen* cs, + static void make_expect_screen_write(struct captured_screen* cs, + COORD cursor_position, + const char* text) { +- /* postion of cursor */ ++ /* position of cursor */ + char* start; + start = cs->text + cs->si.width * (cursor_position.Y - 1) + + cursor_position.X - 1; +@@ -1261,7 +1261,7 @@ TEST_IMPL(tty_save_restore_cursor_position) { + cursor_pos.Y = si.height / 4; + set_cursor_position(&tty_out, cursor_pos); + +- /* restore the cursor postion */ ++ /* restore the cursor position */ + snprintf(buffer, sizeof(buffer), "%su", CSI); + write_console(&tty_out, buffer); + get_cursor_position(&tty_out, &cursor_pos); +@@ -1280,7 +1280,7 @@ TEST_IMPL(tty_save_restore_cursor_position) { + cursor_pos.Y = si.height / 4; + set_cursor_position(&tty_out, cursor_pos); + +- /* restore the cursor postion */ ++ /* restore the cursor position */ + snprintf(buffer, sizeof(buffer), "%s8", ESC); + write_console(&tty_out, buffer); + get_cursor_position(&tty_out, &cursor_pos); +-- +2.33.0 + diff --git a/libuv.spec b/libuv.spec index f8aad5974bd55d6c20e0c70424d1705f5e60c6f3..09bbb63e8b13d16f340ecf3512a47d8c0e97ae98 100644 --- a/libuv.spec +++ b/libuv.spec @@ -1,7 +1,7 @@ Name: libuv Epoch: 1 Version: 1.42.0 -Release: 4 +Release: 6 Summary: A multi-platform support library with a focus on asynchronous I/O # from README.md @@ -10,6 +10,8 @@ URL: http://libuv.org/ Source0: http://dist.libuv.org/dist/v%{version}/%{name}-v%{version}.tar.gz Patch1: backport-Skip-some-tests.patch +Patch2: 0001-test-fix-typo-in-test-tty-escape-sequence-processing.patch +Patch3: 0001-build-fix-build-failures-with-MinGW-new-headers.patch BuildRequires: autoconf automake libtool gcc make @@ -61,6 +63,12 @@ make check %doc ChangeLog %changelog +* Mon Jan 9 2023 caofei - 1:1.42.0-6 +- build: fix build failures with MinGW new headers + +* Sat Jan 7 2023 caofei - 1:1.42.0-5 +- test: fix typo in test-tty-escape-sequence-processing.c + * Thu Dec 15 2022 shixuantong - 1:1.42.0-4 - add make to buildrequires