7 -#if defined(__GLIBC__)
8 -# include <netipx/ipx.h>
10 -# include <linux/ipx.h>
12 +#include <linux/ipx.h>
14 #if defined(__GLIBC__) && defined(HAVE_SIN6_SCOPE_ID_LINUX)
15 # if defined(HAVE_LINUX_IN6_H)
17 # define PF_UNSPEC AF_UNSPEC
20 -/* Under Linux these are enums so we can't test for them with ifdef. */
21 -#define IPPROTO_EGP IPPROTO_EGP
22 -#define IPPROTO_PUP IPPROTO_PUP
23 -#define IPPROTO_IDP IPPROTO_IDP
24 -#define IPPROTO_IGMP IPPROTO_IGMP
25 -#define IPPROTO_RAW IPPROTO_RAW
26 -#define IPPROTO_MAX IPPROTO_MAX
28 static const struct xlat domains[] = {
30 { PF_UNSPEC, "PF_UNSPEC" },
31 @@ -493,24 +481,16 @@ static const struct xlat protocols[] = {
32 { IPPROTO_ICMP, "IPPROTO_ICMP" },
33 { IPPROTO_TCP, "IPPROTO_TCP" },
34 { IPPROTO_UDP, "IPPROTO_UDP" },
36 { IPPROTO_IGMP, "IPPROTO_IGMP" },
39 { IPPROTO_GGP, "IPPROTO_GGP" },
42 { IPPROTO_IPIP, "IPPROTO_IPIP" },
45 { IPPROTO_EGP, "IPPROTO_EGP" },
48 { IPPROTO_PUP, "IPPROTO_PUP" },
51 { IPPROTO_IDP, "IPPROTO_IDP" },
54 { IPPROTO_TP, "IPPROTO_TP" },
56 @@ -571,12 +551,8 @@ static const struct xlat protocols[] = {
57 #ifdef IPPROTO_UDPLITE
58 { IPPROTO_UDPLITE, "IPPROTO_UDPLITE" },
61 { IPPROTO_RAW, "IPPROTO_RAW" },
64 { IPPROTO_MAX, "IPPROTO_MAX" },
68 static const struct xlat msg_flags[] = {
75 -#ifdef HAVE_LINUX_PTRACE_H
76 -# undef PTRACE_SYSCALL
77 -# ifdef HAVE_STRUCT_IA64_FPREG
78 -# define ia64_fpreg XXX_ia64_fpreg
80 -# ifdef HAVE_STRUCT_PT_ALL_USER_REGS
81 -# define pt_all_user_regs XXX_pt_all_user_regs
83 -# include <linux/ptrace.h>
85 -# undef pt_all_user_regs
90 # undef PTRACE_GETREGS
94 #include <asm/posix_types.h>
95 +#include <asm/ptrace.h>
97 #define GETGROUPS_T __kernel_gid_t
99 @@ -2857,7 +2845,7 @@ sys_sched_setscheduler(struct tcb *tcp)
100 if (umove(tcp, tcp->u_arg[2], &p) < 0)
101 tprintf(", %#lx", tcp->u_arg[2]);
103 - tprintf(", { %d }", p.__sched_priority);
104 + tprintf(", { %d }", p.sched_priority);
108 @@ -2872,7 +2860,7 @@ sys_sched_getparam(struct tcb *tcp)
109 if (umove(tcp, tcp->u_arg[1], &p) < 0)
110 tprintf("%#lx", tcp->u_arg[1]);
112 - tprintf("{ %d }", p.__sched_priority);
113 + tprintf("{ %d }", p.sched_priority);
117 @@ -2885,7 +2873,7 @@ sys_sched_setparam(struct tcb *tcp)
118 if (umove(tcp, tcp->u_arg[1], &p) < 0)
119 tprintf("%d, %#lx", (int) tcp->u_arg[0], tcp->u_arg[1]);
121 - tprintf("%d, { %d }", (int) tcp->u_arg[0], p.__sched_priority);
122 + tprintf("%d, { %d }", (int) tcp->u_arg[0], p.sched_priority);
129 #include <sys/user.h>
132 +#include <asm/ptrace.h>
133 #ifdef HAVE_SYS_REG_H
134 # include <sys/reg.h>
135 # ifndef PTRACE_PEEKUSR
138 @@ -774,7 +774,7 @@ printsigevent(struct tcb *tcp, long arg)
139 /* _pad[0] is the _tid field which might not be
140 present in the userlevel definition of the
142 - tprintf("{%d}", sev._sigev_un._pad[0]);
143 + tprintf("{%d}", *(int *) &sev.sigev_notify_function);
144 else if (sev.sigev_notify == SIGEV_THREAD)
145 tprintf("{%p, %p}", sev.sigev_notify_function,
146 sev.sigev_notify_attributes);
150 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
153 +#define _LARGEFILE64_SOURCE 1
157 @@ -222,7 +223,7 @@ extern long ptrace(int, int, char *, lon
158 # define PTRACE_EVENT_EXIT 6
161 -#if !defined(__GLIBC__)
162 +#if !defined(__GLIBC__) && !defined(PTRACE_PEEKUSER)
163 # define PTRACE_PEEKUSER PTRACE_PEEKUSR
164 # define PTRACE_POKEUSER PTRACE_POKEUSR