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.

183 lines
5.6 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../musl/pkg/strace/strace-musl.patch
  5. # Copyright (C) 2014 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. diff -ru strace-4.8.orig/defs.h strace-4.8/defs.h
  17. --- strace-4.8.orig/defs.h 2013-05-14 14:10:42.000000000 +0000
  18. +++ strace-4.8/defs.h 2013-09-20 14:30:38.785856744 +0000
  19. @@ -155,7 +155,7 @@
  20. || defined(METAG) \
  21. || defined(TILE) \
  22. || defined(XTENSA) \
  23. - ) && defined(__GLIBC__)
  24. + ) && defined(__linux__)
  25. # include <sys/ptrace.h>
  26. #else
  27. /* Work around awkward prototype in ptrace.h. */
  28. @@ -222,7 +222,7 @@
  29. # define PTRACE_EVENT_EXIT 6
  30. #endif
  31. -#if !defined(__GLIBC__)
  32. +#if !defined(__GLIBC__) && !defined(PTRACE_PEEKUSER)
  33. # define PTRACE_PEEKUSER PTRACE_PEEKUSR
  34. # define PTRACE_POKEUSER PTRACE_POKEUSR
  35. #endif
  36. diff -ru strace-4.8.orig/desc.c strace-4.8/desc.c
  37. --- strace-4.8.orig/desc.c 2013-05-01 22:39:10.000000000 +0000
  38. +++ strace-4.8/desc.c 2013-09-20 14:30:38.795856744 +0000
  39. @@ -299,7 +299,7 @@
  40. #ifdef X32
  41. tprintf(", start=%lld, len=%lld", fl.l_start, fl.l_len);
  42. #else
  43. - tprintf(", start=%ld, len=%ld", fl.l_start, fl.l_len);
  44. + tprintf(", start=%ld, len=%ld", (long) fl.l_start, (long) fl.l_len);
  45. #endif
  46. if (getlk)
  47. tprintf(", pid=%lu}", (unsigned long) fl.l_pid);
  48. diff -ru strace-4.8.orig/file.c strace-4.8/file.c
  49. --- strace-4.8.orig/file.c 2013-05-06 18:23:01.000000000 +0000
  50. +++ strace-4.8/file.c 2013-09-20 14:30:38.795856744 +0000
  51. @@ -632,7 +632,7 @@
  52. return 0;
  53. }
  54. -#if _LFS64_LARGEFILE
  55. +#if defined _LFS64_LARGEFILE || defined HAVE_LONG_LONG_OFF_T
  56. int
  57. sys_truncate64(struct tcb *tcp)
  58. {
  59. @@ -654,7 +654,7 @@
  60. return 0;
  61. }
  62. -#if _LFS64_LARGEFILE
  63. +#if defined _LFS64_LARGEFILE || defined HAVE_LONG_LONG_OFF_T
  64. int
  65. sys_ftruncate64(struct tcb *tcp)
  66. {
  67. @@ -2322,7 +2322,7 @@
  68. return 0;
  69. }
  70. -#if _LFS64_LARGEFILE
  71. +#if defined _LFS64_LARGEFILE || defined HAVE_LONG_LONG_OFF_T
  72. int
  73. sys_getdents64(struct tcb *tcp)
  74. {
  75. diff -ru strace-4.8.orig/net.c strace-4.8/net.c
  76. --- strace-4.8.orig/net.c 2013-05-17 22:20:02.000000000 +0000
  77. +++ strace-4.8/net.c 2013-09-20 14:30:38.805856744 +0000
  78. @@ -95,12 +95,14 @@
  79. #endif
  80. /* Under Linux these are enums so we can't test for them with ifdef. */
  81. +#if !defined(IPPROTO_MAX)
  82. #define IPPROTO_EGP IPPROTO_EGP
  83. #define IPPROTO_PUP IPPROTO_PUP
  84. #define IPPROTO_IDP IPPROTO_IDP
  85. #define IPPROTO_IGMP IPPROTO_IGMP
  86. #define IPPROTO_RAW IPPROTO_RAW
  87. #define IPPROTO_MAX IPPROTO_MAX
  88. +#endif
  89. static const struct xlat domains[] = {
  90. #ifdef PF_UNSPEC
  91. diff -ru strace-4.8.orig/process.c strace-4.8/process.c
  92. --- strace-4.8.orig/process.c 2013-05-17 22:22:19.000000000 +0000
  93. +++ strace-4.8/process.c 2013-09-20 14:30:38.805856744 +0000
  94. @@ -2857,7 +2857,7 @@
  95. if (umove(tcp, tcp->u_arg[2], &p) < 0)
  96. tprintf(", %#lx", tcp->u_arg[2]);
  97. else
  98. - tprintf(", { %d }", p.__sched_priority);
  99. + tprintf(", { %d }", p.sched_priority);
  100. }
  101. return 0;
  102. }
  103. @@ -2872,7 +2872,7 @@
  104. if (umove(tcp, tcp->u_arg[1], &p) < 0)
  105. tprintf("%#lx", tcp->u_arg[1]);
  106. else
  107. - tprintf("{ %d }", p.__sched_priority);
  108. + tprintf("{ %d }", p.sched_priority);
  109. }
  110. return 0;
  111. }
  112. @@ -2885,7 +2885,7 @@
  113. if (umove(tcp, tcp->u_arg[1], &p) < 0)
  114. tprintf("%d, %#lx", (int) tcp->u_arg[0], tcp->u_arg[1]);
  115. else
  116. - tprintf("%d, { %d }", (int) tcp->u_arg[0], p.__sched_priority);
  117. + tprintf("%d, { %d }", (int) tcp->u_arg[0], p.sched_priority);
  118. }
  119. return 0;
  120. }
  121. diff -ru strace-4.8.orig/signal.c strace-4.8/signal.c
  122. --- strace-4.8.orig/signal.c 2013-05-23 13:41:23.000000000 +0000
  123. +++ strace-4.8/signal.c 2013-09-20 14:30:38.815856744 +0000
  124. @@ -59,6 +59,7 @@
  125. #ifdef IA64
  126. # include <asm/ptrace_offsets.h>
  127. #endif
  128. +#include <asm/ptrace.h>
  129. #if defined(SPARC) || defined(SPARC64) || defined(MIPS)
  130. typedef struct {
  131. diff -ru strace-4.8.orig/strace.c strace-4.8/strace.c
  132. --- strace-4.8.orig/strace.c 2013-05-28 21:49:16.000000000 +0000
  133. +++ strace-4.8/strace.c 2013-09-20 14:30:38.815856744 +0000
  134. @@ -506,7 +506,7 @@
  135. perror_msg_and_die("dup2");
  136. close(fds[0]);
  137. }
  138. - execl(_PATH_BSHELL, "sh", "-c", command, NULL);
  139. + execl(_PATH_BSHELL, "sh", "-c", command, (void*) 0);
  140. perror_msg_and_die("Can't execute '%s'", _PATH_BSHELL);
  141. }
  142. diff -ru strace-4.8.orig/syscall.c strace-4.8/syscall.c
  143. --- strace-4.8.orig/syscall.c 2013-05-14 14:10:42.000000000 +0000
  144. +++ strace-4.8/syscall.c 2013-09-20 14:30:38.825856744 +0000
  145. @@ -72,13 +72,7 @@
  146. # include <elf.h>
  147. #endif
  148. -#if defined(AARCH64)
  149. -# include <asm/ptrace.h>
  150. -#endif
  151. -
  152. -#if defined(XTENSA)
  153. -# include <asm/ptrace.h>
  154. -#endif
  155. +#include <asm/ptrace.h>
  156. #ifndef ERESTARTSYS
  157. # define ERESTARTSYS 512
  158. diff -ru strace-4.8.orig/time.c strace-4.8/time.c
  159. --- strace-4.8.orig/time.c 2012-05-01 21:17:51.000000000 +0000
  160. +++ strace-4.8/time.c 2013-09-20 14:32:49.165856719 +0000
  161. @@ -774,7 +774,11 @@
  162. /* _pad[0] is the _tid field which might not be
  163. present in the userlevel definition of the
  164. struct. */
  165. +#if defined(__GLIBC__)
  166. tprintf("{%d}", sev._sigev_un._pad[0]);
  167. +#else
  168. + tprintf("{%d}", (int) sev.__pad[0]);
  169. +#endif
  170. else if (sev.sigev_notify == SIGEV_THREAD)
  171. tprintf("{%p, %p}", sev.sigev_notify_function,
  172. sev.sigev_notify_attributes);