OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.6 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../musl/pkg/gcc/0020-libstdc-futex-add-time64-compatibility.patch
  5. # Copyright (C) 2020 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. From 9684a815e1cbe854383c3c511e1d84d43c46ec94 Mon Sep 17 00:00:00 2001
  17. From: Ariadne Conill <ariadne@dereferenced.org>
  18. Date: Fri, 21 Aug 2020 07:00:17 +0000
  19. Subject: [PATCH 20/30] libstdc++: futex: add time64 compatibility
  20. ---
  21. libstdc++-v3/src/c++11/futex.cc | 8 ++++++++
  22. 1 file changed, 8 insertions(+)
  23. diff --git a/libstdc++-v3/src/c++11/futex.cc b/libstdc++-v3/src/c++11/futex.cc
  24. index c9de11a7ec7..7be702dbeda 100644
  25. --- a/libstdc++-v3/src/c++11/futex.cc
  26. +++ b/libstdc++-v3/src/c++11/futex.cc
  27. @@ -61,7 +61,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
  28. struct timeval tv;
  29. gettimeofday (&tv, NULL);
  30. // Convert the absolute timeout value to a relative timeout
  31. +#if defined(SYS_futex_time64)
  32. + struct
  33. + {
  34. + long tv_sec;
  35. + long tv_nsec;
  36. + } rt;
  37. +#else
  38. struct timespec rt;
  39. +#endif
  40. rt.tv_sec = __s.count() - tv.tv_sec;
  41. rt.tv_nsec = __ns.count() - tv.tv_usec * 1000;
  42. if (rt.tv_nsec < 0)
  43. --
  44. 2.27.0