libgudev-test-double.patch 923 B

12345678910111213141516171819202122232425262728293031
  1. From 6f0503b1930a0776ef45fa7bc87a87e9dc69dacf Mon Sep 17 00:00:00 2001
  2. From: Mike Gilbert <floppym@gentoo.org>
  3. Date: Sat, 21 Aug 2021 15:09:58 -0400
  4. Subject: [PATCH] Skip test-double if the fr_FR.UTF-8 locale is not available
  5. Bug: https://bugs.gentoo.org/809359
  6. ---
  7. tests/test-double.c | 6 +++++-
  8. 1 file changed, 5 insertions(+), 1 deletion(-)
  9. diff --git a/tests/test-double.c b/tests/test-double.c
  10. index 0092d8b..7ba3abe 100644
  11. --- a/tests/test-double.c
  12. +++ b/tests/test-double.c
  13. @@ -54,7 +54,11 @@ test_double (void)
  14. int main(int argc, char **argv)
  15. {
  16. setlocale (LC_ALL, NULL);
  17. - setlocale (LC_NUMERIC, "fr_FR.UTF-8");
  18. + if (!setlocale (LC_NUMERIC, "fr_FR.UTF-8"))
  19. + /* Skip the test if fr_FR.UTF-8 is not available */
  20. + /* https://mesonbuild.com/Unit-tests.html#skipped-tests-and-hard-errors */
  21. + return 77;
  22. +
  23. g_test_init (&argc, &argv, NULL);
  24. g_test_add_func ("/gudev/double", test_double);
  25. --
  26. 2.33.0