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.

56 lines
2.2 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../uclibc/uClibc-0.9.31-more-workarounds-GCC-PR32219.patch
  5. # Copyright (C) 2010 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 aa67771881d65373da448ad5f7a8393f3a1d9469 Mon Sep 17 00:00:00 2001
  17. From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
  18. Date: Wed, 30 Jun 2010 14:46:37 +0300
  19. Subject: [PATCH] more workarounds for GCC PR32219
  20. MIME-Version: 1.0
  21. Content-Type: text/plain; charset=UTF-8
  22. Content-Transfer-Encoding: 8bit
  23. Commit 2e53dd645d5348f207cec7f8595969dc566c5a55 workarounds GCC
  24. bug when accessing _locale_init and _stdio_init. We need the same
  25. fix for __errno_location and __h_errno_location otherwise we crash
  26. calling null with static and non-threaded builds.
  27. Signed-off-by: Timo Teräs <timo.teras@iki.fi>
  28. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
  29. ---
  30. libc/misc/internals/__uClibc_main.c | 4 ++--
  31. 1 files changed, 2 insertions(+), 2 deletions(-)
  32. diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c
  33. index 3f09ad2..58f6643 100644
  34. --- a/libc/misc/internals/__uClibc_main.c
  35. +++ b/libc/misc/internals/__uClibc_main.c
  36. @@ -447,11 +447,11 @@ void __uClibc_main(int (*main)(int, char **, char **), int argc,
  37. * have resulted in errno being set nonzero, so set it to 0 before
  38. * we call main.
  39. */
  40. - if (likely(__errno_location!=NULL))
  41. + if (likely(not_null_ptr(__errno_location)))
  42. *(__errno_location()) = 0;
  43. /* Set h_errno to 0 as well */
  44. - if (likely(__h_errno_location!=NULL))
  45. + if (likely(not_null_ptr(__h_errno_location)))
  46. *(__h_errno_location()) = 0;
  47. #if defined HAVE_CLEANUP_JMP_BUF && defined __UCLIBC_HAS_THREADS_NATIVE__
  48. --
  49. 1.7.1