diff options
author | CoprDistGit <infra@openeuler.org> | 2024-10-09 03:36:26 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2024-10-09 03:36:26 +0000 |
commit | db43dfdfa8bc2b938582aef3d87e43594c13ee50 (patch) | |
tree | 47b95b2f6ac8d8b7e6fa373a5bd7d661bf7234df /0018-nptl-Fix-tst-cancel30-on-kernels-without-ppoll_time6.patch | |
parent | b933872de72b006230559f77acc3ccfb38a1f343 (diff) |
automatic import of glibcopeneuler20.03
Diffstat (limited to '0018-nptl-Fix-tst-cancel30-on-kernels-without-ppoll_time6.patch')
-rw-r--r-- | 0018-nptl-Fix-tst-cancel30-on-kernels-without-ppoll_time6.patch | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/0018-nptl-Fix-tst-cancel30-on-kernels-without-ppoll_time6.patch b/0018-nptl-Fix-tst-cancel30-on-kernels-without-ppoll_time6.patch new file mode 100644 index 0000000..0aeaa18 --- /dev/null +++ b/0018-nptl-Fix-tst-cancel30-on-kernels-without-ppoll_time6.patch @@ -0,0 +1,55 @@ +From decc9f504ae78bbee6faa49b9bca71c7eae62ea9 Mon Sep 17 00:00:00 2001 +From: Florian Weimer <fweimer@redhat.com> +Date: Tue, 23 Apr 2024 21:16:32 +0200 +Subject: [PATCH 18/26] nptl: Fix tst-cancel30 on kernels without ppoll_time64 + support + +Fall back to ppoll if ppoll_time64 fails with ENOSYS. +Fixes commit 370da8a121c3ba9eeb2f13da15fc0f21f4136b25 ("nptl: Fix +tst-cancel30 on sparc64"). + +Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> +(cherry picked from commit f4724843ada64a51d66f65d3199fe431f9d4c254) +--- + sysdeps/pthread/tst-cancel30.c | 15 +++++++++++---- + 1 file changed, 11 insertions(+), 4 deletions(-) + +diff --git a/sysdeps/pthread/tst-cancel30.c b/sysdeps/pthread/tst-cancel30.c +index ff803386be..ace925ca67 100644 +--- a/sysdeps/pthread/tst-cancel30.c ++++ b/sysdeps/pthread/tst-cancel30.c +@@ -18,6 +18,7 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + ++#include <errno.h> + #include <support/check.h> + #include <support/xstdio.h> + #include <support/xthread.h> +@@ -46,13 +47,19 @@ tf (void *arg) + + /* Wait indefinitely for cancellation, which only works if asynchronous + cancellation is enabled. */ +-#if defined SYS_ppoll || defined SYS_ppoll_time64 +-# ifndef SYS_ppoll_time64 +-# define SYS_ppoll_time64 SYS_ppoll ++#ifdef SYS_ppoll_time64 ++ long int ret = syscall (SYS_ppoll_time64, NULL, 0, NULL, NULL); ++ (void) ret; ++# ifdef SYS_ppoll ++ if (ret == -1 && errno == ENOSYS) ++ syscall (SYS_ppoll, NULL, 0, NULL, NULL); + # endif +- syscall (SYS_ppoll_time64, NULL, 0, NULL, NULL); + #else ++# ifdef SYS_ppoll ++ syscall (SYS_ppoll, NULL, 0, NULL, NULL); ++# else + for (;;); ++# endif + #endif + + return 0; +-- +2.33.0 + |