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.

84 lines
3.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.32.1-linuxthreads-errno-fix.patch
  5. # Copyright (C) 2012 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 af8b2d71ce37b9d4d24ddbc755cdea68de02949a Mon Sep 17 00:00:00 2001
  17. From: Peter Korsgaard <jacmet@sunsite.dk>
  18. Date: Mon, 5 Jul 2010 14:08:17 +0200
  19. Subject: [PATCH] don't make __errno_location / __h_errno_location hidden
  20. Closes #2089 (https://bugs.busybox.net/show_bug.cgi?id=2089)
  21. __errno_location / __h_errno_location access has to go through the PLT
  22. like malloc/free, so the linuxthread variants gets used instead when
  23. compiling with -pthread.
  24. Based on http://github.com/mat-c/uClibc/commit/328d392c54aa5dc2b8e7f398a419087de497de2b
  25. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
  26. ---
  27. include/netdb.h | 1 -
  28. libc/misc/internals/__errno_location.c | 3 ---
  29. libc/misc/internals/__h_errno_location.c | 1 -
  30. libc/sysdeps/linux/common/bits/errno.h | 1 -
  31. 6 files changed, 0 insertions(+), 11 deletions(-)
  32. diff --git a/include/netdb.h b/include/netdb.h
  33. index 9d3807d..ac411ab 100644
  34. --- a/include/netdb.h
  35. +++ b/include/netdb.h
  36. @@ -59,7 +59,6 @@ __BEGIN_DECLS
  37. /* Function to get address of global `h_errno' variable. */
  38. extern int *__h_errno_location (void) __THROW __attribute__ ((__const__));
  39. -libc_hidden_proto(__h_errno_location)
  40. /* Macros for accessing h_errno from inside libc. */
  41. #ifdef _LIBC
  42. diff --git a/libc/misc/internals/__errno_location.c b/libc/misc/internals/__errno_location.c
  43. index 487a9c2..0620860 100644
  44. --- a/libc/misc/internals/__errno_location.c
  45. +++ b/libc/misc/internals/__errno_location.c
  46. @@ -15,6 +15,3 @@ int * weak_const_function __errno_location (void)
  47. {
  48. return &errno;
  49. }
  50. -#ifdef IS_IN_libc /* not really need, only to keep in sync w/ libc_hidden_proto */
  51. -libc_hidden_weak(__errno_location)
  52. -#endif
  53. diff --git a/libc/misc/internals/__h_errno_location.c b/libc/misc/internals/__h_errno_location.c
  54. index 213d398..235df4e 100644
  55. --- a/libc/misc/internals/__h_errno_location.c
  56. +++ b/libc/misc/internals/__h_errno_location.c
  57. @@ -10,4 +10,3 @@ int * weak_const_function __h_errno_location (void)
  58. {
  59. return &h_errno;
  60. }
  61. -libc_hidden_weak(__h_errno_location)
  62. diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c
  63. index 6e520fa..f4a9ebb 100644
  64. --- a/libc/sysdeps/linux/common/bits/errno.h
  65. +++ b/libc/sysdeps/linux/common/bits/errno.h
  66. @@ -43,7 +43,6 @@
  67. # ifndef __ASSEMBLER__
  68. /* Function to get address of global `errno' variable. */
  69. extern int *__errno_location (void) __THROW __attribute__ ((__const__));
  70. -libc_hidden_proto(__errno_location)
  71. # ifdef __UCLIBC_HAS_THREADS__
  72. /* When using threads, errno is a per-thread value. */
  73. --
  74. 1.7.1