--- util.c	2009-01-20 19:35:19.647481800 +0100
+++ util.c	2009-01-20 21:45:36.050851425 +0100
@@ -257,7 +257,19 @@ do_ptrace(int request, struct tcb *tcp, 
 	long l;
 
 	errno = 0;
+#if (defined(LINUXSPARC) || defined(LINUX_X86_64) || defined(LINUX_ARM)) && defined(__GLIBC__)
 	l = ptrace(request, tcp->pid, addr, data);
+#else
+#ifdef __STDC__
+#ifdef LINUX
+	l = ptrace(request, tcp->pid, addr, (long) data);
+#else /* !LINUX */
+	l = ptrace(request, tcp->pid, addr, (int) data);
+#endif /* !LINUX */
+#else /* !__STDC__ */
+	l = ptrace();
+#endif /* !__STDC__ */
+#endif
 	/* Non-ESRCH errors might be our invalid reg/mem accesses,
 	 * we do not record them. */
 	if (errno == ESRCH)
@@ -279,7 +291,19 @@ ptrace_restart(int op, struct tcb *tcp, 
 	const char *msg;
 
 	errno = 0;
+#if (defined(LINUXSPARC) || defined(LINUX_X86_64) || defined(LINUX_ARM)) && defined(__GLIBC__)
 	ptrace(op, tcp->pid, (void *) 1, (void *) (long) sig);
+#else
+#ifdef __STDC__
+#ifdef LINUX
+	ptrace(op, tcp->pid, (void *) 1, (long) sig);
+#else /* !LINUX */
+	ptrace(op, tcp->pid, (void *) 1, sig);
+#endif /* !LINUX */
+#else /* !__STDC__ */
+	ptrace();
+#endif /* !__STDC__ */
+#endif
 	err = errno;
 	if (!err || err == ESRCH)
 		return 0;
--- strace.cvs/strace.c	2009-01-20 19:35:19.451482002 +0100
+++ strace/strace.c	2009-01-20 22:36:46.260849651 +0100
@@ -2535,8 +2535,22 @@ handle_stopped_tcbs(struct tcb *tcp)
 				 * that it didnt really work.
 				 * Old kernels are known to lie here.
 				 */
-				if (ptrace(PTRACE_SETOPTIONS, pid, (char *) 0,
-					(void *) (PTRACE_O_TRACESYSGOOD | PTRACE_O_TRACEEXEC)) == 0)
+#if (defined(LINUXSPARC) || defined(LINUX_X86_64) || defined(LINUX_ARM)) && defined(__GLIBC__)
+					if (ptrace(PTRACE_SETOPTIONS, pid, (char *) 0,
+						(void *) (PTRACE_O_TRACESYSGOOD | PTRACE_O_TRACEEXEC)) == 0)
+#else
+#ifdef __STDC__
+#ifdef LINUX
+					if (ptrace(PTRACE_SETOPTIONS, pid, (char *) 0,
+						(long) (PTRACE_O_TRACESYSGOOD | PTRACE_O_TRACEEXEC)) == 0)
+#else /* !LINUX */
+					if (ptrace(PTRACE_SETOPTIONS, pid, (char *) 0,
+						(int) (PTRACE_O_TRACESYSGOOD | PTRACE_O_TRACEEXEC)) == 0)
+#endif /* !LINUX */
+#else /* !__STDC__ */
+					if (ptrace() == 0)
+#endif /* !__STDC__ */
+#endif
 					ptrace_stop_sig = SIGTRAP | 0x80;
 			}
 #endif
@@ -2563,7 +2577,19 @@ handle_stopped_tcbs(struct tcb *tcp)
 				/* Take a better look...  */
 				siginfo_t si;
 				si.si_signo = 0;
+#if (defined(LINUXSPARC) || defined(LINUX_X86_64) || defined(LINUX_ARM)) && defined(__GLIBC__)
 				ptrace(PTRACE_GETSIGINFO, pid, (void*) 0, (void*) &si);
+#else
+#ifdef __STDC__
+#ifdef LINUX
+				ptrace(PTRACE_GETSIGINFO, pid, (void*) 0, (long) &si);
+#else /* !LINUX */
+				ptrace(PTRACE_GETSIGINFO, pid, (void*) 0, (int) &si);
+#endif /* !LINUX */
+#else /* !__STDC__ */
+				ptrace();
+#endif /* !__STDC__ */
+#endif
 				/*
 				 * Check some fields to make sure we see
 				 * real SIGTRAP.
--- ChangeLog	2009-01-20 19:35:19.650481640 +0100
+++ ChangeLog	2009-01-20 23:00:58.590851453 +0100
@@ -1,3 +1,10 @@
+2009-01-20  Michal Nowak  <mnowak@redhat.com>
+
+	* util.c: Passing argument 4 of ‘ptrace’ made integer from pointer
+	without a cast.
+	* strace.c: Passing argument 4 of ‘ptrace’ made integer from pointer
+	without a cast.
+
 2009-01-17  Denys Vlasenko  <dvlasenk@redhat.com>
 
 	Two cleanups: tcb table expansion failure is not really a survivable
