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
91 @@ -2857,7 +2844,7 @@ sys_sched_setscheduler(struct tcb *tcp)
92 if (umove(tcp, tcp->u_arg[2], &p) < 0)
93 tprintf(", %#lx", tcp->u_arg[2]);
95 - tprintf(", { %d }", p.__sched_priority);
96 + tprintf(", { %d }", p.sched_priority);
100 @@ -2872,7 +2859,7 @@ sys_sched_getparam(struct tcb *tcp)
101 if (umove(tcp, tcp->u_arg[1], &p) < 0)
102 tprintf("%#lx", tcp->u_arg[1]);
104 - tprintf("{ %d }", p.__sched_priority);
105 + tprintf("{ %d }", p.sched_priority);
109 @@ -2885,7 +2872,7 @@ sys_sched_setparam(struct tcb *tcp)
110 if (umove(tcp, tcp->u_arg[1], &p) < 0)
111 tprintf("%d, %#lx", (int) tcp->u_arg[0], tcp->u_arg[1]);
113 - tprintf("%d, { %d }", (int) tcp->u_arg[0], p.__sched_priority);
114 + tprintf("%d, { %d }", (int) tcp->u_arg[0], p.sched_priority);
121 #include <sys/user.h>
124 +#include <asm/ptrace.h>
125 #ifdef HAVE_SYS_REG_H
126 # include <sys/reg.h>
127 # ifndef PTRACE_PEEKUSR
130 @@ -774,7 +774,7 @@ printsigevent(struct tcb *tcp, long arg)
131 /* _pad[0] is the _tid field which might not be
132 present in the userlevel definition of the
134 - tprintf("{%d}", sev._sigev_un._pad[0]);
135 + tprintf("{%d}", *(int *) &sev.sigev_notify_function);
136 else if (sev.sigev_notify == SIGEV_THREAD)
137 tprintf("{%p, %p}", sev.sigev_notify_function,
138 sev.sigev_notify_attributes);
142 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
145 +#define _LARGEFILE64_SOURCE 1
149 @@ -222,7 +223,7 @@ extern long ptrace(int, int, char *, lon
150 # define PTRACE_EVENT_EXIT 6
153 -#if !defined(__GLIBC__)
154 +#if !defined(__GLIBC__) && !defined(PTRACE_PEEKUSER)
155 # define PTRACE_PEEKUSER PTRACE_PEEKUSR
156 # define PTRACE_POKEUSER PTRACE_POKEUSR